From: Nelson Benitez Leon <nelsonjesus.benitez@seap•minhap.es>
To: Jeff King <peff@peff•net>
Cc: Sam Vilain <sam@vilain•net>, Thomas Rast <trast@inf•ethz.ch>,
git@vger•kernel.org
Subject: Re: [PATCH 2/3] http: try standard proxy env vars when http.proxy config option is not set
Date: Thu, 01 Mar 2012 10:57:03 +0100 [thread overview]
Message-ID: <4F4F47EF.40405@seap.minhap.es> (raw)
In-Reply-To: <20120229210816.GB628@sigill.intra.peff.net>
On 02/29/2012 10:08 PM, Jeff King wrote:
> On Wed, Feb 29, 2012 at 11:46:03AM +0100, Nelson Benitez Leon wrote:
>
>>> Good point. We sometimes follow this order:
>>>
>>> 1. git-specific environment variables (i.e., $GIT_HTTP_PROXY, if
>>> it existed)
>>> 2. git config files (i.e., http.proxy)
>>> 3. generic system environment (i.e., $http_proxy).
>>>
>>> So thinking about it that way, the original patch makes more sense.
>>
>> So, in PATCH 2/3, apart from expanding the commit message.. do we want
>> to support HTTP_PROXY or only http_proxy ? HTTP_PROXY seems to not be
>> very used by existent programs, but support it it's only a gentenv call..
>
> If HTTP_PROXY is not in wide use, I don't see a reason to support it.
Ok
> And I take back what I said about environment precedence, based on the
> discussion. Also, I don't think there is a need to strdup the results of
> getenv here, is there? So I think the code you want is just:
>
> if (!curl_http_proxy)
> curl_http_proxy = getenv("http_proxy");
but curl_http_proxy gets freed in http_cleanup as follows:
free((void *)curl_http_proxy);
Is it ok to free strings returned by getenv() ? I thought nope, so I
used strdup which existent code was already using..
>
> and the justification for the commit message is that we need to know the
> proxy value outside of curl, because the next patch will do some
> extra processing on the value.
>
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-03-01 8:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 12:54 [PATCH 2/3] http: try standard proxy env vars when http.proxy config option is not set Nelson Benitez Leon
2012-02-28 12:19 ` Thomas Rast
2012-02-28 14:57 ` Nelson Benitez Leon
2012-02-28 14:34 ` Thomas Rast
2012-02-28 19:24 ` Junio C Hamano
2012-02-29 10:38 ` Nelson Benitez Leon
2012-02-29 18:15 ` Junio C Hamano
2012-03-01 10:18 ` Nelson Benitez Leon
2012-03-04 19:19 ` Daniel Stenberg
2012-02-28 19:15 ` Jeff King
2012-02-28 19:27 ` Sam Vilain
2012-02-28 19:34 ` Jeff King
2012-02-29 9:55 ` Matthieu Moy
2012-02-29 10:46 ` Nelson Benitez Leon
2012-02-29 21:08 ` Jeff King
2012-03-01 9:57 ` Nelson Benitez Leon [this message]
2012-03-01 9:10 ` Jeff King
2012-03-11 16:56 ` James Cloos
2012-03-11 19:12 ` Junio C Hamano
2012-03-13 10:22 ` Nelson Benitez Leon
2012-03-14 4:36 ` Junio C Hamano
2012-03-14 9:54 ` Nelson Benitez Leon
2012-03-14 20:41 ` Junio C Hamano
2012-03-15 9:38 ` Nelson Benitez Leon
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=4F4F47EF.40405@seap.minhap.es \
--to=nelsonjesus.benitez@seap$(echo .)minhap.es \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
--cc=sam@vilain$(echo .)net \
--cc=trast@inf$(echo .)ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox