Re: [PATCH 2/3] http: try standard proxy env vars when http.proxy config option is not set
- From
Thomas Rast <trast@inf.ethz.ch>
- Date
- Feb 28, 2012, 12:19 UTC
- Message-ID
- <878vjn8823.fsf@thomas.inf.ethz.ch>
- In-Reply-To
- <4F4CCE8A.4010800@seap.minhap.es>
Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es> writes:
Show 10 quoted lines
> + if (!curl_http_proxy) {
> + const char *env_proxy;
> + env_proxy = getenv("HTTP_PROXY");
> + if (!env_proxy) {
> + env_proxy = getenv("http_proxy");
> + }
> + if (env_proxy) {
> + curl_http_proxy = xstrdup(env_proxy);
> + }
> + }Admittedly I'm mostly clueless about curl, but while investigating the NTLM login thing I noticed this bit in curl(1):
ENVIRONMENT
The environment variables can be specified in lower case or upper
case. The lower case version has precedence. http_proxy is an
exception as it is only available in lower case.Which raises the questions:
* Why is this needed? Does git's use of libcurl ignore http_proxy? [1] seems to indicate that libcurl respects <protocol>_proxy automatically.
* Why do you (need to?) support HTTP_PROXY when curl doesn't?
[1] http://curl.haxx.se/libcurl/c/libcurl-tutorial.html, "Environment Variables"
--
Thomas Rast
trast@{inf,student}.ethz.ch