git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Nelson Benitez LeonNext: Nelson Benitez Leon
Message 4 of 6 in “http: try http_proxy env var when http.proxy config option is not set”
  1. 2/4 http: try http_proxy env var when http.proxy config option is not setNelson Benitez Leon, Mar 5, 2012
  2. Junio C HamanoMar 5, 2012
  3. Nelson Benitez LeonMar 6, 2012
  4. Jeff KingMar 6, 2012
  5. Nelson Benitez LeonMar 6, 2012
  6. Junio C HamanoMar 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.