www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 065bac3b8ae4c0c621b93fe9217a6b3279b6930e
parent db8bb3484d68f4f0d6482581f24741b402a889cd
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 16 Aug 2017 01:07:10 +0200

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.

Diffstat:
Mchrome/content/zotero/xpcom/storage/webdav.js | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js @@ -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