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 17999 c6b6d2fad11ac61e2c76de8dde0f7b6ff7a3b18c
parent 17998 2d6118e1f800bec197acdb3ef8d3de39a555efe3
child 18000 287d35b00ecfb09db159ed670c3a01017d47848c
push id1207
push userryanvm@gmail.com
push dateMon, 05 May 2014 17:34:14 +0000
treeherdercomm-aurora@14e652347dee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
@@ -598,16 +598,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