Bug 986936 - No update to iCloud caldav possible since March 2014. r+a=philipp
authort-master <tiermaster@gmx.at>
Fri, 02 May 2014 22:33:27 +0200
changeset 16105 51447af3c1f5121ede42239f60c07f6d6ba509c6
parent 16103 7df033e6e4bb39ec6fd094b38d676e57a0f5be3a
child 16108 41aefb13384e6b14a916c3ca17f2006b03a7a053
push id56
push usermozilla@kewis.ch
push dateThu, 22 May 2014 15:15:26 +0000
bugs986936
Bug 986936 - No update to iCloud caldav possible since March 2014. r+a=philipp
calendar/providers/caldav/calDavRequestHandlers.js
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -597,16 +597,24 @@ webDavSyncHandler.prototype = {
                     // url matches the request, the current token should be
                     // saved and another request should be made. We don't
                     // actually compare the URL, its too easy to get this
                     // wrong.
 
                     // The 507 doesn't mean the data received is invalid, so
                     // continue processing.
                     this.additionalSyncNeeded = true;
+                } else if (r.status &&
+                           r.status.indexOf(" 200") &&
+                           r.href &&
+                           r.href.endsWith("/")) {
+                    // iCloud returns status responses for directories too
+                    // so we just ignore them if they have status code 200. We
+                    // want to make sure these are not counted as unhandled
+                    // errors in the next block
                 } else if ((r.getcontenttype &&
                             r.getcontenttype.substr(0,13) == "text/calendar") ||
                            (r.status &&
                             r.status.indexOf(" 404") == -1)) {
                     // If the response element is still not handled, log an
                     // error only if the content-type is text/calendar or the
                     // response status is different than 404 not found.  We
                     // don't care about response elements on non-calendar