Skip to content

Commit

Permalink
Fix for Github issue 629 (SNOW-902727)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-spanaite committed Sep 19, 2023
1 parent d157bd5 commit a1a8a40
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/main/java/net/snowflake/client/core/SFBaseSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,31 @@ public HttpClientSettingsKey getHttpClientKey() throws SnowflakeSQLException {
boolean httpUseProxy = Boolean.parseBoolean(systemGetProperty("http.useProxy"));
String httpProxyHost = systemGetProperty("http.proxyHost");
String httpProxyPort = systemGetProperty("http.proxyPort");
String httpProxyUser = (systemGetProperty("http.proxyUser") != null) ? systemGetProperty("http.proxyUser") : "";
String httpProxyPassword = (systemGetProperty("http.proxyPassword") != null) ? systemGetProperty("http.proxyPassword") : "";
String httpsProxyHost = systemGetProperty("https.proxyHost");
String httpsProxyPort = systemGetProperty("https.proxyPort");
String httpsProxyUser = (systemGetProperty("https.proxyUser") != null) ? systemGetProperty("https.proxyUser") : "";
String httpsProxyPassword = (systemGetProperty("https.proxyPassword") != null) ? systemGetProperty("https.proxyPassword") : "";
String httpProxyProtocol = systemGetProperty("http.proxyProtocol");
String noProxy = systemGetEnv("NO_PROXY");
String nonProxyHosts = systemGetProperty("http.nonProxyHosts");
// log the JVM parameters that are being used
if (httpUseProxy) {
logger.debug(
"http.useProxy={}, http.proxyHost={}, http.proxyPort={}, https.proxyHost={},"
+ " https.proxyPort={}, http.nonProxyHosts={}, NO_PROXY={}, http.proxyProtocol={}",
"http.useProxy={}, http.proxyHost={}, http.proxyPort={}, http.proxyUser={},"
+ "http.proxyPassword={}, https.proxyHost={}, https.proxyPort={}, "
+ "https.proxyUser={}, https.proxyPassword={}, http.nonProxyHosts={},"
+ "NO_PROXY={}, http.proxyProtocol={}",
httpUseProxy,
httpProxyHost,
httpProxyPort,
httpProxyUser,
httpProxyPassword,
httpsProxyHost,
httpsProxyPort,
httpsProxyUser,
httpsProxyPassword,
nonProxyHosts,
noProxy,
httpProxyProtocol,
Expand Down Expand Up @@ -427,8 +437,8 @@ public HttpClientSettingsKey getHttpClientKey() throws SnowflakeSQLException {
httpsProxyHost,
proxyPort,
combinedNonProxyHosts,
"", /* user = empty */
"", /* password = empty */
httpsProxyUser,
httpsProxyPassword,
"https",
userAgentSuffix,
gzipDisabled);
Expand All @@ -448,8 +458,8 @@ public HttpClientSettingsKey getHttpClientKey() throws SnowflakeSQLException {
httpProxyHost,
proxyPort,
combinedNonProxyHosts,
"", /* user = empty */
"", /* password = empty */
httpProxyUser,
httpProxyPassword,
"http",
userAgentSuffix,
gzipDisabled);
Expand Down

0 comments on commit a1a8a40

Please sign in to comment.