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

Re: [PATCH] http.proxy: also mention https_proxy and all_proxy

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2012, 22:22 UTC
Message-ID
<7v399p72a8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120303174252.GC28602@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> On Sat, Mar 03, 2012 at 03:50:53PM +0100, Clemens Buchacher wrote:
>
>> The current wording of the http.proxy documentation suggests that
>> http_proxy is somehow equivalent to http.proxy. However, while
>> http.proxy (by the means of curl's CURLOPT_PROXY option) overrides the
>> proxy for both HTTP and HTTPS protocols, the http_proxy environment
>> variable is used only for HTTP. But since the docs mention only
>> http_proxy, a user might expect it to apply to all HTTP-like protocols.
>
> Hmm, I didn't know that. This certainly adds an interesting twist to the
> patch in a nearby thread to start reading http_proxy ourselves.
Yeah, I too had an "Ahhhh" moment.

I recall that I was frustrated more than 10 years ago when I had to point at our company proxy with many *_proxy variables in my .login and ended up writing a shell script (and placed it under source control) that generates dot files from a single source (which of course is under source control).

The manual page for curl seems to say that they have separate HTTPS_PROXY and friends all in caps, and http_proxy is left lowercase for historical reasons [*1*].

As to the way forward, I suspect that http.proxy was a mistake to begin with, considering the structure of namespace our configuration variables fit in. Shouldn't they be proxy.http, proxy.https, etc.?

And if we were to map curl's HTTPS_PROXY to proxy.https to fix this namespace gotha, we could treat http.proxy as a historical mistake, and introduce proxy.http as what matches curl's http_proxy.

Then the change proposed in the nearby thread can notice http_proxy and behave as if proxy.http is set, which would only affect http but not https. When http.proxy is set, we still let it affect anything curl handles.

[Footnote]

*1* Come to think of it, the alleged Mac OS X breakage I mentined may merely be a second-hand rumor of a misdiagnosed user error---the user might have been trying to reach https:// resource with only http_proxy set.

Previous: Jakub NarebskiNext: Clemens Buchacher
Message 4 of 8 in “http.proxy: also mention https_proxy and all_proxy”
  1. http.proxy: also mention https_proxy and all_proxyClemens Buchacher, Mar 3, 2012
  2. Jeff KingMar 3, 2012
  3. [RFH] 'man:' macro for asciidocJakub Narebski, Mar 3, 2012
  4. Junio C HamanoMar 3, 2012
  5. Clemens BuchacherMar 4, 2012
  6. Junio C HamanoMar 4, 2012
  7. http.proxy: also mention https_proxy and all_proxyClemens Buchacher, Mar 4, 2012
  8. Junio C HamanoMar 5, 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.