Commit 5f3276c7 by Christopher Bargren

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.
parent 887c1931
......@@ -774,6 +774,18 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur
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();
error = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment