FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #4112 from cbargren/fix/proxy-env-vars · nodegit/nodegit@b0c3fa3 · GitHub

Repository navigation

Commit b0c3fa3

Browse files
Edward Thomson
authored
Merge pull request #4112 from cbargren/fix/proxy-env-vars
Add support for lowercase proxy environment variables
2 parents 683ff4f + 61189a1 commit b0c3fa3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/remote.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,12 @@ int git_remote__get_http_proxy(git_remote *remote, bool use_ssl, char **proxy_ur
770770
goto found;
771771
}
772772

773-
/* HTTP_PROXY / HTTPS_PROXY environment variables */
774-
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
773+
/* http_proxy / https_proxy environment variables */
774+
error = git__getenv(&val, use_ssl ? "https_proxy" : "http_proxy");
775+
776+
/* try uppercase environment variables */
777+
if (error == GIT_ENOTFOUND)
778+
error = git__getenv(&val, use_ssl ? "HTTPS_PROXY" : "HTTP_PROXY");
775779

776780
if (error < 0) {
777781
if (error == GIT_ENOTFOUND) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL