Don't mock HTTP requests for resource:// or chrome:// URLs

This commit is contained in:
Dan Stillman 2019-05-06 03:57:28 -04:00
parent cb11e5a3e0
commit ddf2a6a116

View file

@ -264,9 +264,8 @@ Zotero.HTTP = new function() {
var deferred = Zotero.Promise.defer();
if (!this.mock) {
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
.createInstance();
if (!this.mock || url.startsWith('resource://') || url.startsWith('chrome://')) {
var xmlhttp = new XMLHttpRequest();
}
else {
var xmlhttp = new this.mock;