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:
Dan Stillman 2017-08-16 01:07:10 +02:00
parent db8bb3484d
commit 065bac3b8a

View file

@ -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