You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
settings: match curl lowercase proxy envar behaviour
libcurl supports multiple different environment variables [1] to
configure proxy behaviour: http_proxy, https_proxy, all_proxy, and
no_proxy.
Unlike most other environment variables these proxy envars are normally
_lowercase_, not uppercase. This convention was set by libwww back in
the early 1990s. When libcurl was first released however, it was not
aware of this schism and only implemented checks for uppercase variants
of these envars: HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY.
In time, libcurl learned to also read the lowercase variants, and gives
them precedence over the uppercase forms (since the former are quasi-
standards).
However, to further complicate the matter, libcurl no longer reads the
uppercase HTTP_PROXY variable specifically. This change was made to
address a security concern with some CGI webservers [2].
The problem is that today GCM only reads the uppercase variants of the
environment variables! This is inconsistent with libcurl, and therefore
Git's behaviour (that we aim to be consistent/co-operative with).
We change GCM's behaviour to match that of libcurl/Git in that the
lowercase proxy envars are preferred to the uppercase ones, and the
uppercase HTTP_PROXY variable is ignored.
Dropping support for the HTTP_PROXY uppercase envar is technically a
breaking change, but if the user had only set this uppercase envar then
Git would not be proxying the actual remote calls, only GCM, which is
most likely not what the user wanted.
[1] https://everything.curl.dev/usingcurl/proxies#proxy-environment-variables
[2] https://everything.curl.dev/usingcurl/proxies#http_proxy-in-lower-case-only
0 commit comments