From 051581cbb0ee6260df4e9ea37b540162894265d8 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 28 Oct 2008 21:57:22 +0000 Subject: [PATCH] Make storage sync a bit more open-minded about 20x response codes for PUTs --- chrome/content/zotero/xpcom/storage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 8fd7a3fcd6..6273af21fa 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -441,6 +441,7 @@ Zotero.Sync.Storage = new function () { Zotero.Utilities.HTTP.WebDAV.doPut(uri, item.attachmentModificationTime + '', function (req) { switch (req.status) { + case 200: case 201: case 204: break; @@ -1303,9 +1304,9 @@ Zotero.Sync.Storage = new function () { + " finished with status code " + status); switch (status) { + case 200: case 201: case 204: - case 200: // IIS 5 break; default: @@ -1615,7 +1616,9 @@ Zotero.Sync.Storage = new function () { Zotero.debug(req.status); switch (req.status) { + case 200: case 201: + case 204: // Delete test file Zotero.Utilities.HTTP.WebDAV.doDelete( testFileURI, @@ -1624,9 +1627,8 @@ Zotero.Sync.Storage = new function () { Zotero.debug(req.status); switch (req.status) { + case 200: // IIS 5.1 and Sakai return 200 case 204: - // IIS 5.1 and Sakai return 200 - case 200: callback( uri, Zotero.Sync.Storage.SUCCESS,