mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-12 01:12:40 +00:00
Add support for lowercase proxy environment variables
curl supports HTTPS_PROXY in addition to https_proxy (and their http counterparts). This change ensures parity with curl's behavior.
This commit is contained in:
parent
887c1931a2
commit
5f3276c7e6
12
src/remote.c
12
src/remote.c
@ -773,6 +773,18 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur
|
||||
/* HTTP_PROXY / HTTPS_PROXY environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
|
||||
|
||||
if (error < 0) {
|
||||
if (error != GIT_ENOTFOUND) {
|
||||
return error;
|
||||
}
|
||||
|
||||
giterr_clear();
|
||||
error = 0;
|
||||
}
|
||||
|
||||
/* try lowercase environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "https_proxy" : "http_proxy");
|
||||
|
||||
if (error < 0) {
|
||||
if (error == GIT_ENOTFOUND) {
|
||||
giterr_clear();
|
||||
|
Loading…
Reference in New Issue
Block a user