public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nelson Benitez Leon <nelsonjesus.benitez@seap•minhap.es>
To: Thomas Rast <trast@inf•ethz.ch>
Cc: git@vger•kernel.org, peff@peff•net, sam@vilain•net,
	sam.vilain@catalyst•net.nz
Subject: Re: [PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL
Date: Tue, 28 Feb 2012 19:15:40 +0100	[thread overview]
Message-ID: <4F4D19CC.5030303@seap.minhap.es> (raw)
In-Reply-To: <8762er6nb2.fsf@thomas.inf.ethz.ch>

On 02/28/2012 03:32 PM, Thomas Rast wrote:
> Nelson Benitez Leon <nelsonjesus.benitez@seap•minhap.es> writes:
> 
>> -	if (curl_http_proxy)
>> +	if (curl_http_proxy) {
>>  		curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);
>> +		curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
>> +	}
> 
> There was another attempt at doing the same very recently:
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/191140
> 
> I could swear there was a second one, but apparently that was you.
> Neither you nor Marco submitter have so far answered the question I
> raised in
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/191155
> 
> which can be summarized as: please make a case -- and put it in the
> message! -- for or against making this configurable.  Is there a speed
> tradeoff?  (However, you could steal some of Daniel Stenberg's
> reasoning!)

I don't see any reason to make this configurable, CuRL people made this
cool CURLAUTH_ANY option that automatically chooses the best auth method
from among those the server supports, that means you don't have to 
investigate if your proxy is using Basic, Digest or NTLM methods, and
use a specific curl option for each of them, instead curl
will ask the proxy and use the appropiate, and it will only do that if 
you are using a proxy (i.e. you've set CURLOPT_PROXY or you have http_proxy
env var), also curl will not try to authenticate if you've not provided
username or password in the proxy string, as I've been told here[1]..

so, setting CURLOPT_PROXYAUTH = CURLAUTH_ANY will not affect the speed of
normal curl use, only if 1) you are using a proxy and 2) your proxy requires
authentication, only then curl will just make two or three roundtrips to find out
the auth method the proxy is using, that is a tiny cost compared to having the
user find out the proxy auth type and set an specifically config option to enable
that type.

So I would call CURLAUTH_ANY as out-of-the-box proxy support, and I don't want it
activated from a config option, I want it to still be out-of-the-box in git also..

[1] https://bugzilla.redhat.com/show_bug.cgi?id=769254#c6

  reply	other threads:[~2012-02-28 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 12:52 [PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL Nelson Benitez Leon
2012-02-28 14:32 ` Thomas Rast
2012-02-28 18:15   ` Nelson Benitez Leon [this message]
2012-02-28 17:30     ` Thomas Rast

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=4F4D19CC.5030303@seap.minhap.es \
    --to=nelsonjesus.benitez@seap$(echo .)minhap.es \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    --cc=sam.vilain@catalyst$(echo .)net.nz \
    --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