Skip to content

Commit

Permalink
Revert "SNOW-1825719 - setting proxy port if default was skipped duri…
Browse files Browse the repository at this point in the history
…ng parsing"

This reverts commit c32d13c.
  • Loading branch information
sfc-gh-pmotacki committed Nov 26, 2024
1 parent c32d13c commit 90d3250
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,8 @@ exports.getProxyFromEnv = function (isHttps = true) {
Logger.getInstance().debug(`Util.getProxyEnv: Using ${protocol.toUpperCase()}_PROXY from the environment variable`);
if (proxyFromEnv.indexOf('://') === -1) {
Logger.getInstance().info('Util.getProxyEnv: the protocol was missing from the environment proxy. Use the HTTP protocol.');
proxyFromEnv = protocol + '://' + proxyFromEnv;
proxyFromEnv = 'http' + '://' + proxyFromEnv;
isHttps = false;
}
proxyFromEnv = new URL(proxyFromEnv);
const port = getDefaultPortIfNotSet(proxyFromEnv, isHttps);
Expand Down
6 changes: 3 additions & 3 deletions test/unit/util_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ describe('Util', function () {
result: {
host: 'myproxy.server.com',
port: 1234,
protocol: 'https:',
protocol: 'http:',
noProxy: '*.amazonaws.com|*.my_company.com|*.test.com',
},
},
Expand All @@ -1401,8 +1401,8 @@ describe('Util', function () {
httpsProxy: 'myproxy.server.com',
result: {
host: 'myproxy.server.com',
port: 443,
protocol: 'https:',
port: 80,
protocol: 'http:',
noProxy: '*.amazonaws.com|*.my_company.com|*.test.com',
},
},
Expand Down

0 comments on commit 90d3250

Please sign in to comment.