Make storage sync a bit more open-minded about 20x response codes for PUTs
This commit is contained in:
parent
04ea113823
commit
051581cbb0
1 changed files with 5 additions and 3 deletions
|
@ -441,6 +441,7 @@ Zotero.Sync.Storage = new function () {
|
||||||
|
|
||||||
Zotero.Utilities.HTTP.WebDAV.doPut(uri, item.attachmentModificationTime + '', function (req) {
|
Zotero.Utilities.HTTP.WebDAV.doPut(uri, item.attachmentModificationTime + '', function (req) {
|
||||||
switch (req.status) {
|
switch (req.status) {
|
||||||
|
case 200:
|
||||||
case 201:
|
case 201:
|
||||||
case 204:
|
case 204:
|
||||||
break;
|
break;
|
||||||
|
@ -1303,9 +1304,9 @@ Zotero.Sync.Storage = new function () {
|
||||||
+ " finished with status code " + status);
|
+ " finished with status code " + status);
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
case 200:
|
||||||
case 201:
|
case 201:
|
||||||
case 204:
|
case 204:
|
||||||
case 200: // IIS 5
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1615,7 +1616,9 @@ Zotero.Sync.Storage = new function () {
|
||||||
Zotero.debug(req.status);
|
Zotero.debug(req.status);
|
||||||
|
|
||||||
switch (req.status) {
|
switch (req.status) {
|
||||||
|
case 200:
|
||||||
case 201:
|
case 201:
|
||||||
|
case 204:
|
||||||
// Delete test file
|
// Delete test file
|
||||||
Zotero.Utilities.HTTP.WebDAV.doDelete(
|
Zotero.Utilities.HTTP.WebDAV.doDelete(
|
||||||
testFileURI,
|
testFileURI,
|
||||||
|
@ -1624,9 +1627,8 @@ Zotero.Sync.Storage = new function () {
|
||||||
Zotero.debug(req.status);
|
Zotero.debug(req.status);
|
||||||
|
|
||||||
switch (req.status) {
|
switch (req.status) {
|
||||||
|
case 200: // IIS 5.1 and Sakai return 200
|
||||||
case 204:
|
case 204:
|
||||||
// IIS 5.1 and Sakai return 200
|
|
||||||
case 200:
|
|
||||||
callback(
|
callback(
|
||||||
uri,
|
uri,
|
||||||
Zotero.Sync.Storage.SUCCESS,
|
Zotero.Sync.Storage.SUCCESS,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue