mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 11:06:32 +00:00
Merge pull request #4112 from cbargren/fix/proxy-env-vars
Add support for lowercase proxy environment variables
This commit is contained in:
@@ -770,8 +770,12 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur
|
||||
goto found;
|
||||
}
|
||||
|
||||
/* HTTP_PROXY / HTTPS_PROXY environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
|
||||
/* http_proxy / https_proxy environment variables */
|
||||
error = git__getenv(&val, use_ssl ? "https_proxy" : "http_proxy");
|
||||
|
||||
/* try uppercase environment variables */
|
||||
if (error == GIT_ENOTFOUND)
|
||||
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
|
||||
|
||||
if (error < 0) {
|
||||
if (error == GIT_ENOTFOUND) {
|
||||
|
||||
Reference in New Issue
Block a user