Skip to content

Commit

Permalink
Rollback possible fix for #1062 -- did not work
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Dec 11, 2021
1 parent d2cd454 commit 19e3edf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/java/org/broad/igv/util/HttpUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -712,22 +712,22 @@ private HttpURLConnection openConnection(
HttpURLConnection conn = null;
if (proxySettings != null && proxySettings.isProxyDefined()) {

// NOTE: setting disabledSchemes to "" through System.setProperty does not work !!! Use ProxiedHttpsConnection
// System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
// System.setProperty("jdk.http.auth.proxying.disabledSchemes", "");

if (url.getProtocol().equals("https") && proxySettings.isUserPwDefined()) {
conn = new ProxiedHttpsConnection(url, proxySettings.proxyHost, proxySettings.proxyPort,
proxySettings.user, proxySettings.pw);
} else {
// NOTE: setting disabledSchemes to "" through System.setProperty does not work !!!
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
System.setProperty("jdk.http.auth.proxying.disabledSchemes", "");

// if (url.getProtocol().equals("https") && proxySettings.isUserPwDefined()) {
// conn = new ProxiedHttpsConnection(url, proxySettings.proxyHost, proxySettings.proxyPort,
// proxySettings.user, proxySettings.pw);
// } else {
Proxy proxy = new Proxy(proxySettings.type, new InetSocketAddress(proxySettings.proxyHost, proxySettings.proxyPort));
conn = (HttpURLConnection) url.openConnection(proxy);
if (proxySettings.isUserPwDefined()) {
byte[] bytes = (proxySettings.user + ":" + proxySettings.pw).getBytes();
String encodedUserPwd = String.valueOf(Base64Coder.encode(bytes));
conn.setRequestProperty("Proxy-Authorization", "Basic " + encodedUserPwd);
}
}
// }
}
if (conn == null && !PreferencesManager.getPreferences().getAsBoolean("PROXY.DISABLE_CHECK")) {
Proxy sysProxy = getSystemProxy(url.toExternalForm());
Expand Down

0 comments on commit 19e3edf

Please sign in to comment.