http: authenticate on NTLM proxies and others suppported, by CuRL
PATCH 1/3 http: authenticate on NTLM proxies and others suppported, by CuRL
--- http.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
http.c +3 -1
@@ -295,8 +295,10 @@ static CURL *get_curl_handle(void)if (curl_ftp_no_epsv)curl_easy_setopt (result,CURLOPT_FTP_USE_EPSV ,0 ); -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 ); + }return result; }
Signature · 1 line
1.7.7.6
http.c static CURL *get_curl_handle(void) · line 301
Quoted 5 lines · Nelson Benitez Leon
http.c +3
-1-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!)
Note that Marco (the submitter in the first one) has told me privately that he could not pursue this further right now, so I suppose he'd be happy if you could finish it.
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.chQuoted 16 lines · Thomas Rast
http.c static CURL *get_curl_handle(void) · line 301
Quoted 5 lines · Nelson Benitez Leon
http.c +3
-1-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
Quoted 6 lines
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..
Quoted 17 lines · Nelson Benitez Leon
Quoted 16 lines · Thomas Rast
http.c static CURL *get_curl_handle(void) · line 301
Quoted 5 lines · Nelson Benitez Leon
http.c +3
-1-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
Quoted 8 lines
Quoted 6 lines
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, [snip]
Sorry for not making this clear, but you don't have to explain it to me in the list archives; rather, the commit message should sufficiently take care of it. That is, I was objecting to your (lack of a) commit message.
The argument you need to counter here is (Daniel explains this) curl does an extra roundtrip to the proxy to determine which protocols work, which is a little extra cost.
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.ch