Allow http_proxy in addition to HTTP_PROXY variable
Currently the cli seems to only honor the HTTP_PROXYenv var (upper case) and ignores http_proxy.
The http_proxy lower case is pretty common as the following extract from the curl command shows.
As a result, it is sometimes time consumming to newcomers to debug why the http_proxy env var is silently ignored
curl(1) Curl Manual curl(1)
NAME
curl - transfer a URL
[...]
ENVIRONMENT
The environment variables can be specified in lower case or upper case. The lower case version has prece-
dence. http_proxy is an exception as it is only available in lower case.
Using an environment variable to set the proxy has the same effect as using the --proxy option.
http_proxy [protocol://]<host>[:port]
Sets the proxy server to use for HTTP.
HTTPS_PROXY [protocol://]<host>[:port]
Sets the proxy server to use for HTTPS.
[...]
$ http_proxy=http://127.0.0.1:3128 HTTP_PROXY= cf-v6.3.0.exe curl info
RATÉ
demande Erreur de création:
GetAddrInfoW: No such host is known.
$ http_proxy=http://127.0.0.1:3128 HTTP_PROXY=http://127.0.0.1:3128 cf-v6.3.0.exe curl info
{
"name": "vcap",
[...]
}
}
$ http_proxy= HTTP_PROXY=http://127.0.0.1:3128 cf-v6.3.0.exe curl info
{
"name": "vcap",
[...]
}
}
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/75182382.
Sure, we'll make this enhancement.
Thanks Dave!
@gberche-orange Can you provide more detail about the failure case? We can't reproduce it. The CLI passes along the responsibility for proxying to golang's http.ProxyFromEnvironment function, which should respond to both lower and upper case proxy environment variable. It does this properly for us.
Thanks!
Hi @gberche-orange Sorry to be a pest, but the CLI team's story is getting closer to the top of the backlog. It is currently blocked until we can get input from you on creating a reproducible test case. We get proper responses to both http_proxy and HTTP_PROXY. Thanks
OK. I'll go ahead and close this issue. If you're able to provide more details to help us reproduce, please reopen the issue.
Hi @goehmen. Sorry for late response, I was away for a few weeks and just got back. I just retried and am unable to reproduce as well regardless of the version (from 6.1 to 6.4). I must have made a mis-diagnostic when submitting the issue, not sure how.
Apologies for that and the associated wasted time on this.