From 0769e0e1f885d7592b8e28d86b29eed6f51c572b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 16 Sep 2008 06:25:44 +0000 Subject: [PATCH] Accept 200 for PROPPATCH (and now compatible with Air Sharing iPhone app) --- chrome/content/zotero/xpcom/storage.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 6d5d5f881..bbde22f22 100644 --- 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'); } }