There was an error while loading. Please reload this page.
1 parent 627ffb3 commit e093444Copy full SHA for e093444
1 file changed
https-proxy-agent.js
@@ -31,11 +31,12 @@ function HttpsProxyAgent (opts) {
31
32
this.secure = proxy.protocol && proxy.protocol == 'https:';
33
34
+ // prefer `hostname` over `host`, and set the `port` if needed
35
proxy.host = proxy.hostname || proxy.host;
36
proxy.port = +proxy.port || (this.secure ? 443 : 80);
37
38
if (proxy.host && proxy.path) {
- // XXX: if both a `host` and `path` are specified then it's most likely the
39
+ // if both a `host` and `path` are specified then it's most likely the
40
// result of a `url.parse()` call... we need to remove the `path` portion so
41
// that `net.connect()` doesn't attempt to open that as a unix socket file.
42
delete proxy.path;
0 commit comments