commit 961b4b17d4eeea5dc6d2e50828e603534d645b4f
parent 08c8c4dfbd56be3180c57b5dae436640aecbc45f
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 15 Sep 2011 07:58:42 +0000
Remove antique code
Diffstat:
1 file changed, 11 insertions(+), 29 deletions(-)
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js
@@ -32,36 +32,18 @@ Zotero.HTTP = new function() {
return false;
}
- // Workaround for "Accept third-party cookies" being off in Firefox 3.0.1
- // https://www.zotero.org/trac/ticket/1070
- if (Zotero.isFx30) {
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- var ds = Cc["@mozilla.org/webshell;1"].
- createInstance(Components.interfaces.nsIDocShellTreeItem).
- QueryInterface(Ci.nsIInterfaceRequestor);
- ds.itemType = Ci.nsIDocShellTreeItem.typeContent;
- var xmlhttp = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
- createInstance(Ci.nsIXMLHttpRequest);
- xmlhttp.mozBackgroundRequest = true;
- xmlhttp.open("GET", url, true);
- xmlhttp.channel.loadGroup = ds.getInterface(Ci.nsILoadGroup);
- xmlhttp.channel.loadFlags |= Ci.nsIChannel.LOAD_DOCUMENT_URI;
- }
- else {
- var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance();
- // Prevent certificate/authentication dialogs from popping up
- xmlhttp.mozBackgroundRequest = true;
- xmlhttp.open('GET', url, true);
- // Send cookie even if "Allow third-party cookies" is disabled (>=Fx3.6 only)
- if (!Zotero.isFx35) {
- var channel = xmlhttp.channel;
- channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
- channel.forceAllowThirdPartyCookie = true;
- }
- }
+ var xmlhttp = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
+ .createInstance();
+ // Prevent certificate/authentication dialogs from popping up
+ xmlhttp.mozBackgroundRequest = true;
+ xmlhttp.open('GET', url, true);
+
+ // Send cookie even if "Allow third-party cookies" is disabled (>=Fx3.6 only)
+ var channel = xmlhttp.channel;
+ channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
+ channel.forceAllowThirdPartyCookie = true;
+
// Don't cache GET requests
xmlhttp.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;