Some comments on https://github.com/restify/node-restify/blob/master/lib/clients/http_client.js#L366-L378
Some issues here:
- parsing the envvar blows up if just given, e.g. "1.2.3.4:5678" without
the leading 'http://'. This works with curl. It should with restify
clients as well.
- if
options.proxy is given, it should override the env
options.proxy shouldn't have to be parsed already. This should allow
a URL string (arguably it should prefer that form). Parsing the URL
is implementation guts.
- the
isProxyForURL|NO_PROXY handling should be overrideable via
options as well. I'm undecided, but leaning toward thinking that
NO_PROXY should be ignore if options.proxy is given. I.e. if
the programmer passed in options.proxy, they are intentionally
overriding the environment. If they want the env, they could easily
also pull and pass in options.no_proxy.
Thoughts? /cc yunong and others.
If it seems reasonable to others I could work on a patch.
Some comments on https://github.com/restify/node-restify/blob/master/lib/clients/http_client.js#L366-L378
Some issues here:
the leading 'http://'. This works with curl. It should with restify
clients as well.
options.proxyis given, it should override the envoptions.proxyshouldn't have to be parsed already. This should allowa URL string (arguably it should prefer that form). Parsing the URL
is implementation guts.
isProxyForURL|NO_PROXYhandling should be overrideable viaoptionsas well. I'm undecided, but leaning toward thinking thatNO_PROXY should be ignore if
options.proxyis given. I.e. ifthe programmer passed in
options.proxy, they are intentionallyoverriding the environment. If they want the env, they could easily
also pull and pass in
options.no_proxy.Thoughts? /cc yunong and others.
If it seems reasonable to others I could work on a patch.