Bug 986936 - No update to iCloud caldav possible since March 2014. r+a=philipp
--- 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