Avoid XML Parsing Error for WebDAV requests that don't return Content-Type
If responseType isn't set and the response doesn't include a Content-Type header, Firefox tries to parse the file as XML, and if the file isn't XML it logs an "XML Parsing Error", which includes the username and password.
This commit is contained in:
parent
db8bb3484d
commit
065bac3b8a
1 changed files with 3 additions and 0 deletions
|
@ -656,6 +656,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
|||
missingFileURI,
|
||||
{
|
||||
successCodes: [404],
|
||||
responseType: 'text',
|
||||
requestObserver,
|
||||
debug: true
|
||||
}
|
||||
|
@ -685,6 +686,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
|||
testFileURI,
|
||||
{
|
||||
successCodes: [200, 404],
|
||||
responseType: 'text',
|
||||
requestObserver,
|
||||
debug: true
|
||||
}
|
||||
|
@ -1110,6 +1112,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
|||
uri,
|
||||
{
|
||||
successCodes: [200, 300, 404],
|
||||
responseType: 'text',
|
||||
requestObserver: xmlhttp => request.setChannel(xmlhttp.channel),
|
||||
dontCache: true,
|
||||
debug: true
|
||||
|
|
Loading…
Reference in a new issue