commit a6564e92d7dfc1c26f0facfaf419321689341085
parent ae22ce7ecdab9cf8f69bd5e119025fbcbfd4f4c9
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 28 Jul 2017 20:21:21 -0400
Update proxy authentication URLs
And try all, since it doesn't do any of this unless there's a PAC file,
it's not actually a network request unless the site should be proxied,
and it should only make a single HEAD request unless a previous one
fails.
There's a possibility some proxies are limited to HTTP, in which case
changing these to HTTPS might stop this from working. If so, we'd need
to add back HTTP addresses.
Closes #1273
Diffstat:
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js
@@ -525,8 +525,7 @@ Zotero.HTTP = new function() {
/**
- * Make a foreground HTTP request in order to trigger a proxy authentication
- * dialog in Standalone
+ * Make a foreground HTTP request in order to trigger a proxy authentication dialog
*
* Other Zotero.HTTP requests are background requests by default, and
* background requests don't trigger a proxy auth prompt, so we make a
@@ -551,8 +550,7 @@ Zotero.HTTP = new function() {
uris.unshift(ZOTERO_CONFIG.PROXY_AUTH_URL);
return Zotero.spawn(function* () {
- let max = 3; // how many URIs to try after the general Zotero one
- for (let i = 0; i <= max; i++) {
+ for (let i = 0; i <= uris.length; i++) {
let uri = uris.shift();
if (!uri) {
break;
@@ -589,7 +587,7 @@ Zotero.HTTP = new function() {
let proxyInfo = yield _proxyAsyncResolve(uri);
if (proxyInfo) {
Zotero.debug("Proxy required for " + uri + " -- making HEAD request to trigger auth prompt");
- yield Zotero.HTTP.promise("HEAD", uri, {
+ yield Zotero.HTTP.request("HEAD", uri, {
foreground: true,
dontCache: true
})
diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js
@@ -23,7 +23,7 @@ pref("extensions.zotero.automaticScraperUpdates",true);
pref("extensions.zotero.zoteroDotOrgVersionHeader", true);
pref("extensions.zotero.triggerProxyAuthentication", true);
// Proxy auth URLs should respond successfully to HEAD requests over HTTP and HTTPS (in case of forced HTTPS requests)
-pref("extensions.zotero.proxyAuthenticationURLs", 'http://www.acm.org,http://www.ebscohost.com,http://www.elsevier.com,http://www.ieee.org,http://www.jstor.org,http://www.ovid.com,http://www.springer.com,http://www.tandfonline.com');
+pref("extensions.zotero.proxyAuthenticationURLs", 'https://www.acm.org,https://www.ebscohost.com,https://www.sciencedirect.com,https://ieeexplore.ieee.org,https://www.jstor.org,http://www.ovid.com,https://link.springer.com,https://www.tandfonline.com');
pref("extensions.zotero.browserContentContextMenu", true);
pref("extensions.zotero.openURL.resolver","http://worldcatlibraries.org/registry/gateway");
pref("extensions.zotero.openURL.version","1.0");