[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH 2/3] http: try standard proxy env vars when http.proxy config option is not set
From:       Jeff King <peff () peff ! net>
Date:       2012-02-29 21:08:16
Message-ID: 20120229210816.GB628 () sigill ! intra ! peff ! net
[Download RAW message or body]

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.
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");

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic