commit fc8da5f8cde015d87e580a46b3f447b31e794373 parent f1207a90eb9dfe97fd7f2a055e07caef52a3afd8 Author: Simon Kornblith <simon@simonster.com> Date: Tue, 23 Aug 2011 03:38:53 +0000 Don't auto-associate domains if an HTTP error code is received Diffstat:
| M | chrome/content/zotero/xpcom/proxy.js | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/proxy.js b/chrome/content/zotero/xpcom/proxy.js @@ -94,8 +94,12 @@ Zotero.Proxies = new function() { if(m) { var host = m[proxy.parameters.indexOf("%h")+1]; // add this host if we know a proxy - if(proxy.autoAssociate && !Zotero.Proxies.hosts[host] && proxy.hosts.indexOf(host) == -1 && !_isBlacklisted(host)) { - // if no saved host and host is not blacklisted, auto associate + if(proxy.autoAssociate // if autoAssociate is on + && channel.responseStatus < 400 // and query was successful + && !Zotero.Proxies.hosts[host] // and host is not saved + && proxy.hosts.indexOf(host) === -1 + && !_isBlacklisted(host) // and host is not blacklisted + ) { proxy.hosts.push(host); proxy.save(true);