Send Content-Type: text/xml header for WebDAV PROPFIND
This commit is contained in:
parent
316a6f91b2
commit
39a8e8fb0c
|
@ -628,6 +628,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
var headers = { Depth: 0 };
|
var headers = { Depth: 0 };
|
||||||
|
var contentTypeXML = { "Content-Type": "text/xml; charset=utf-8" };
|
||||||
|
|
||||||
// Get the Authorization header used in case we need to do a request
|
// Get the Authorization header used in case we need to do a request
|
||||||
// on the parent below
|
// on the parent below
|
||||||
|
@ -640,7 +641,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
||||||
// Test whether Zotero directory exists
|
// Test whether Zotero directory exists
|
||||||
req = yield Zotero.HTTP.request("PROPFIND", uri, {
|
req = yield Zotero.HTTP.request("PROPFIND", uri, {
|
||||||
body: xmlstr,
|
body: xmlstr,
|
||||||
headers,
|
headers: Object.assign({}, headers, contentTypeXML),
|
||||||
successCodes: [207, 404],
|
successCodes: [207, 404],
|
||||||
requestObserver,
|
requestObserver,
|
||||||
debug: true
|
debug: true
|
||||||
|
@ -721,7 +722,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
||||||
// Zotero directory wasn't found, so see if at least
|
// Zotero directory wasn't found, so see if at least
|
||||||
// the parent directory exists
|
// the parent directory exists
|
||||||
req = yield Zotero.HTTP.request("PROPFIND", parentURI, {
|
req = yield Zotero.HTTP.request("PROPFIND", parentURI, {
|
||||||
headers,
|
headers: Object.assign({}, headers, contentTypeXML),
|
||||||
body: xmlstr,
|
body: xmlstr,
|
||||||
requestObserver,
|
requestObserver,
|
||||||
successCodes: [207, 404]
|
successCodes: [207, 404]
|
||||||
|
@ -982,9 +983,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
||||||
uri,
|
uri,
|
||||||
{
|
{
|
||||||
body: xmlstr,
|
body: xmlstr,
|
||||||
headers: {
|
headers: Object.assign({ Depth: 1 }, contentTypeXML),
|
||||||
Depth: 1
|
|
||||||
},
|
|
||||||
successCodes: [207],
|
successCodes: [207],
|
||||||
debug: true
|
debug: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user