Commit 2af282d8 by Christopher Bargren

Addressing PR feedback

parent 5f3276c7
...@@ -770,21 +770,14 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur ...@@ -770,21 +770,14 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur
goto found; goto found;
} }
/* HTTP_PROXY / HTTPS_PROXY environment variables */ /* http_proxy / https_proxy environment variables */
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY"); error = git__getenv(&val, use_ssl ? "https_proxy" : "http_proxy");
if (error < 0) {
if (error != GIT_ENOTFOUND) {
return error;
}
giterr_clear(); if (error == GIT_ENOTFOUND) {
error = 0; /* try uppercase environment variables */
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
} }
/* try lowercase environment variables */
error = git__getenv(&val, use_ssl ? "https_proxy" : "http_proxy");
if (error < 0) { if (error < 0) {
if (error == GIT_ENOTFOUND) { if (error == GIT_ENOTFOUND) {
giterr_clear(); giterr_clear();
......
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