From: Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH] Try an uppercase version of $prot_proxy env var
Date: Thu, 26 Apr 2012 18:29:47 +0200 [thread overview]
Message-ID: <4F9977FB.8010601@seap.minhap.es> (raw)
In-Reply-To: <xmqqehraa5ct.fsf@junio.mtv.corp.google.com>
On 04/26/2012 05:18 PM, Junio C Hamano wrote:
> Jeff King <peff@peff.net> 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.
Fine. You beat me on time, anyway I send you my version just for the sake
of having done it.
>From 66c5e59f486088d12b48a2e624a98242e7ebce46 Mon Sep 17 00:00:00 2001
From: Nelson Benitez Leon <nbenitezl@gmail.com>
Date: Thu, 26 Apr 2012 14:44:03 +0200
Subject: [PATCH] http: try an uppercase version of $prot_proxy env var
If the lowercase version of $prot_proxy is not found
then try the uppercase one, excluding HTTP_PROXY case
as it is ignored by cURL.
Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
---
http.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/http.c b/http.c
index 6a98195..0ca5bba 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 && strcmp("http", cre_url.protocol)) { /* skip HTTP_PROXY as cURL ignores it */
+ 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
next prev parent reply other threads:[~2012-04-26 15:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 22:04 What's cooking in git.git (Apr 2012, #09; Mon, 23) Junio C Hamano
2012-04-24 9:14 ` Nelson Benitez Leon
2012-04-24 18:57 ` Junio C Hamano
2012-04-26 13:16 ` [PATCH] Try an uppercase version of $prot_proxy env var Nelson Benitez Leon
2012-04-26 13:08 ` Jeff King
2012-04-26 15:18 ` Junio C Hamano
2012-04-26 16:29 ` Nelson Benitez Leon [this message]
2012-04-27 8:12 ` Jeff King
2012-04-27 15:03 ` Junio C Hamano
2012-04-26 14:04 ` Junio C Hamano
2012-04-25 2:14 ` What's cooking (incremental) Junio C Hamano
2012-04-25 9:06 ` Thomas Rast
2012-04-25 15:17 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F9977FB.8010601@seap.minhap.es \
--to=nelsonjesus.benitez@seap.minhap.es \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.