Subject: Re: [PATCH 2/3] http: try standard proxy env vars when http.proxy config option is not set

From: Thomas Rast <[email-masked]>
Date: Tue, 28 Feb 2012 13:19:00 +0100

Nelson Benitez Leon <[email-masked]> writes:

> +	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