commit 6a9b372e66a38c4f46e9c6e5d9b30019eafe7e66
parent 3d615f2b9c8657514647411f6028fd7b47f082f8
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 15 Nov 2008 16:35:02 +0000
Fixes #1204, Automatic proxy code gets stuck in a loop
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/proxy.js b/chrome/content/zotero/xpcom/proxy.js
@@ -130,7 +130,17 @@ Zotero.Proxies = new function() {
if(webNav) {
var proxied = this.properToProxy(url, true);
- if(proxied) webNav.loadURI(proxied, 0, channel.URI, null, null);
+ if(proxied) {
+ channel.QueryInterface(Components.interfaces.nsIHttpChannel);
+ // If the referrer is a proxiable host, we already have access
+ // (e.g., we're on-campus) and shouldn't redirect
+ if (channel.referrer) {
+ if (this.properToProxy(channel.referrer.spec, true)) {
+ return;
+ }
+ }
+ webNav.loadURI(proxied, 0, channel.URI, null, null);
+ }
}
}
}