Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH] Try an uppercase version of $prot_proxy env var

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:40
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] writes:
Don't we explicitly not want to do this when the protocol is http? Curl
doesn't respect HTTP_PROXY.
Yes.  Here is what I'll queue.

-- >8 --
From: Nelson Benitez Leon <redacted>
Date: Thu, 26 Apr 2012 15:16:51 +0200
Subject: [PATCH] http: try an uppercase version of $proto_proxy

Fall back to an uppercase version of $prot_proxy environment variable
when the lowercase version is not found (but do not do that for http).

Signed-off-by: Nelson Benitez Leon <redacted>
Signed-off-by: Junio C Hamano <redacted>
---
 http.c |    6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/http.c b/http.c
index ad2dc36..262778b 100644
--- a/http.c
+++ b/http.c
@@ -320,6 +320,12 @@ static CURL *get_curl_handle(const char *url)
 		strbuf_addf(&buf, "%s_proxy", cre_url.protocol);
 		env_proxy_var = strbuf_detach(&buf, NULL);
 		env_proxy = getenv(env_proxy_var);
+		if (!env_proxy && strcmp("http_proxy", env_proxy_var)) {
+			char *p;
+			for (p = env_proxy_var; *p; p++)
+				*p = toupper(*p);
+			env_proxy = getenv(env_proxy_var);
+		}
 		if (env_proxy) {
 			read_http_proxy = 1;
 			no_proxy = getenv("no_proxy");
-- 
1.7.10.475.g8b959
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help