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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try an uppercase version of $prot_proxy env var when thelowercase version 
is not found.

Signed-off-by: Nelson Benitez Leon <nbenitezl@xxxxxxxxx>
---
This is for pu branch where http-proxy-more is located.

 http.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/http.c b/http.c
index 6a98195..bf9c20e 100644
--- a/http.c
+++ b/http.c
@@ -329,6 +329,13 @@ 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) {
+			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.7.6

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]