commit 0769e0e1f885d7592b8e28d86b29eed6f51c572b
parent edad44c2dbaa9f0e872ab1a1a0f654739ab73d64
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 16 Sep 2008 06:25:44 +0000
Accept 200 for PROPPATCH (and now compatible with Air Sharing iPhone app)
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -477,8 +477,10 @@ Zotero.Sync.Storage = new function () {
{ Authorization: _cachedCredentials.authHeader } : null;
Zotero.Utilities.HTTP.WebDAV.doProp('PROPPATCH', uri, xmlstr, function (req) {
- _checkResponse(req);
-
+ // Some servers return 200 instead of 207 is everything is OK
+ if (req.status != 200) {
+ _checkResponse(req);
+ }
callback(item, Zotero.Date.toUnixTimestamp(mdate));
}, headers);
}
@@ -1671,11 +1673,11 @@ Zotero.Sync.Storage = new function () {
!(req.responseXML.firstChild.namespaceURI == 'DAV:' &&
req.responseXML.firstChild.localName == 'multistatus')) {
Zotero.debug(req.responseText);
- _error('Invalid response from server');
+ _error('Invalid response from storage server');
}
if (!req.responseXML.childNodes[0].firstChild) {
- _error('Empty response from server');
+ _error('Empty response from storage server');
}
}