Fix bug 943340 - CalDAV not working after 2.6.3 update with some CalDAV servers [Error: r.status is undefined]. r=philipp,a=philipp
authorSven Giermann <giermann@funke.de>
Wed, 04 Dec 2013 15:43:56 +0100
changeset 16051 9711f03accf92f6321670ebd89f1d3752ec1ae19
parent 16050 a2f5b206e52b5d8526f66ab0b689247e07a77d77
child 16052 c1e422c0054ab3b7a9147e08ac7c8c810a3ad48f
push id28
push usermozilla@kewis.ch
push dateWed, 04 Dec 2013 14:44:45 +0000
reviewersphilipp, philipp
bugs943340
Fix bug 943340 - CalDAV not working after 2.6.3 update with some CalDAV servers [Error: r.status is undefined]. r=philipp,a=philipp
calendar/providers/caldav/calDavRequestHandlers.js
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -586,17 +586,18 @@ webDavSyncHandler.prototype = {
                     this.itemsReported[r.href] = r.getetag;
                     let itemId = this.calendar.mHrefIndex[r.href];
                     let oldEtag = (itemId && this.calendar.mItemInfoCache[itemId].etag);
 
                     if (!oldEtag || oldEtag != r.getetag) {
                         // Etag mismatch, getting new/updated item.
                         this.itemsNeedFetching.push(r.href);
                     }
-                } else if (r.status.indexOf(" 507") > -1) {
+                } else if (r.status &&
+                            r.status.indexOf(" 507") > -1) {
                     // webdav-sync says that if a 507 is encountered and the
                     // 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.