www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e3193526fa45424d636f22827a58fb959d044aa9
parent 7b24dbd75c3c5bd3da5a650d3ff99190f050e669
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 22 Apr 2013 15:53:54 -0400

Fix for WebDAV server returning 300 if lastsync but no lastsync.txt

https://forums.zotero.org/discussion/29040/

Diffstat:
Mchrome/content/zotero/xpcom/storage/webdav.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js @@ -995,10 +995,12 @@ Zotero.Sync.Storage.WebDAV = (function () { }) .then(function () { return Zotero.HTTP.promise("GET", lastSyncURI, - { debug: true, successCodes: [200, 404] }); + { debug: true, successCodes: [200, 300, 404] }); }) .then(function (req) { - if (req.status == 404) { + // If lastsync exists but not lastsync.txt, some servers try to + // be helpful and return 300. + if (req.status == 300 || req.status == 404) { Zotero.debug("No last WebDAV sync file"); // If no lastsync.txt, check previously used 'lastsync',