Re: [PATCH v3 2/4] http: try http_proxy env var when http.proxy config option is not set
- From
Jeff King <peff@peff.net>
- Date
- Mar 6, 2012, 11:27 UTC
- Message-ID
- <20120306112745.GA6733@sigill.intra.peff.net>
- In-Reply-To
- <4F560196.8070500@seap.minhap.es>
On Tue, Mar 06, 2012 at 01:22:46PM +0100, Nelson Benitez Leon wrote:
Show 6 quoted lines
> > Also I thought the conclusion from the other thread was that even if > > we were to do this, we should apply the http_proxy environment only > > when we are talking to http:// and for https:// we would instead > > read HTTPS_PROXY or something? > > Ok I completely miss this, can this be added in a later patch?
Hmm. Your current series munges the curl_http_proxy variable in order to put the username and password in, and therefore needs to know what is in the proxy variable.
But if you switch patch 4/4 to set CURLOPT_PROXYUSERPWD, then we won't need to care what's in curl_http_proxy, no? We will get a 407 from curl because curl detected the proxy (either from the environment, or because we actually told it via curl_http_proxy), and then we will fill in the username and password without touching the actual proxy URL.
So this patch can just be dropped at that point, right?
-Peff