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(); var deferred = Zotero.Promise.defer();
if (!this.mock) { if (!this.mock || url.startsWith('resource://') || url.startsWith('chrome://')) {
var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] var xmlhttp = new XMLHttpRequest();
.createInstance();
} }
else { else {
var xmlhttp = new this.mock; var xmlhttp = new this.mock;