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 16600 4a09d588fb2d140f4ca5b91bdcb82e08f059620c
parent 16599 4d36e733d36f868299ff2a2641cd0eb238e090e5
child 16601 24a9e761a6144e5946a8f83ff0c96f39796eec10
push id1042
push usermozilla@kewis.ch
push dateWed, 04 Dec 2013 14:47:38 +0000
treeherdercomm-beta@4a09d588fb2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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.