Skip to content

Commit f861ea1

Browse files
committed
Fixed empty proxy.
1 parent 4863f9f commit f861ea1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ global.REQUEST = exports.request = function(url, flags, data, callback, cookies,
609609

610610
options.proxy = proxy;
611611

612-
if (uri.protocol === 'https:') {
612+
if (proxy && uri.protocol === 'https:') {
613613
proxy.tls = true;
614614
uri.agent = new ProxyAgent(options);
615615
uri.agent.request = Http.request;
@@ -1125,7 +1125,7 @@ exports.download = function(url, flags, data, callback, cookies, headers, encodi
11251125

11261126
options.proxy = proxy;
11271127

1128-
if (uri.protocol === 'https:') {
1128+
if (proxy && uri.protocol === 'https:') {
11291129
proxy.tls = true;
11301130
uri.agent = new ProxyAgent(options);
11311131
uri.agent.request = Http.request;

0 commit comments

Comments
 (0)