Closed Bug 630077 Opened 15 years ago Closed 15 years ago

After upgrading lightning 1.0b1->1.0b2 caldav fails with Error: Assert failed: unexepcted endBatch!

Categories

(Calendar :: Provider: CalDAV, defect)

Lightning 1.0b2
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: mfuzzey, Assigned: nomisvai)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 Server is davmail exchange gateway Problem occurs when some events give 404 errors like: <D:response><D:href>/users/mfuzzey@XXXX/calendar/7539fa32-c535-4a1a-a257-de51db628262.ics</D:href><D:propstat><D:status>HTTP/1.1 404 Not Found</D:status></D:propstat></D:response> Lightning error log shows: Warning: CalDAV: Unexpected response, status: undefined, href: /users/mfuzzey@XXXX/calendar/7539fa32-c535-4a1a-a257-de51db628262.ics calendar-data Error: Assert failed: unexepcted endBatch! Note the "undefined" as status even though status returned by server is 404 Problem appears to be that server is giving status within <propset><status> sub element but lightning expecting just status. Following hack patch fixes the problem: --- /home/mfuzzey/tmp/calDavRequestHandlers.js 2010-06-13 22:04:47.000000000 +0200 +++ calendar-js/calDavRequestHandlers.js 2011-01-30 19:49:17.197549198 +0100 @@ -922,6 +922,12 @@ r.href.length) { r.href = decodeURIComponent(r.href); } + + + if (!r.status && r.propstat_status) { + r.status = r.propstat_status; + } + if (r.href && r.href.length && r.status && r.status.length && I'm not quite sure why the new code in 1.0b2 uses stores the status to propstat_status as it doesn't actually seem to be used anywhere... Reproducible: Always
Version: unspecified → Lightning 1.0b2
Simon, could you take a look at this? The code seems to introduced by your webdav-sync patch. Martin is right, propstat_status is not used but set.
Assignee: nobody → nomisvai
Status: UNCONFIRMED → NEW
Ever confirmed: true
The response from DavMail is invalid, the status in the propstat element is used to indicate properties retrieval status, for example: <D:response> <D:href>http://webdav.example.com/home/cyrusdaboo/vcard.vcf</D:href> <D:propstat> <D:prop> <D:getetag>"00002-abcd2"</D:getetag> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> <D:propstat> <D:prop> <R:bigbox xmlns:R="urn:ns.example.com:boxschema"/> </D:prop> <D:status>HTTP/1.1 404 Not Found</D:status> </D:propstat> </D:response> To indicate a "deleted" resource using webdav sync the server must send a response like this: <D:response> <D:href>http://webdav.example.com/home/cyrusdaboo/test.doc</D:href> <D:status>HTTP/1.1 404 Not Found</D:status> </D:response> The staths from the propstat element is read into a separate variable just for that reason.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Do we need any extra processing in a propstat/status run? I now understand why you need to differ between variables, but do we need to save the variable at all then? This is just out of curiosity, I agree its a davmail bug.
You need to log in before you can comment on or make changes to this bug.