From ddf2a6a1168dc558c3cf5a0997ae84cdc4937a98 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 6 May 2019 03:57:28 -0400 Subject: [PATCH] Don't mock HTTP requests for resource:// or chrome:// URLs --- chrome/content/zotero/xpcom/http.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index 18be915d46..99f05d4504 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -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;