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
This commit is contained in:
Dan Stillman 2017-07-28 20:21:21 -04:00
parent ae22ce7ecd
commit a6564e92d7
2 changed files with 4 additions and 6 deletions

View file

@ -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
})

View file

@ -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");