{"thread":{"id":"29774","subject":"[PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL","startedAt":"2012-02-28T12:52:17Z","lastAt":"2012-02-28T18:15:40Z","messageCount":4,"participants":["Nelson Benitez Leon","Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"185619","messageId":"4F4CCE01.8080300@seap.minhap.es","threadId":"29774","inReplyTo":null,"subject":"[PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL","fromName":"Nelson Benitez Leon","fromEmail":"nelsonjesus.benitez@seap.minhap.es","sentAt":"2012-02-28T12:52:17Z","receivedAt":"2012-02-28T12:52:17Z","isPatch":true,"sender":{"key":"nelsonjesus.benitez@seap.minhap.es","avatar":null},"body":"Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>\n---\n http.c |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 0ffd79c..8ac8eb6 100644\n--- a/http.c\n+++ b/http.c\n@@ -295,8 +295,10 @@ static CURL *get_curl_handle(void)\n \tif (curl_ftp_no_epsv)\n \t\tcurl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);\n \n-\tif (curl_http_proxy)\n+\tif (curl_http_proxy) {\n \t\tcurl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);\n+\t\tcurl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);\n+\t}\n \n \treturn result;\n }\n-- \n1.7.7.6\n"},{"id":"185625","messageId":"8762er6nb2.fsf@thomas.inf.ethz.ch","threadId":"29774","inReplyTo":"4F4CCE01.8080300@seap.minhap.es","subject":"Re: [PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2012-02-28T14:32:33Z","receivedAt":"2012-02-28T14:32:33Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es> writes:\n\n> -\tif (curl_http_proxy)\n> +\tif (curl_http_proxy) {\n>  \t\tcurl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);\n> +\t\tcurl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);\n> +\t}\n\nThere was another attempt at doing the same very recently:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/191140\n\nI could swear there was a second one, but apparently that was you.\nNeither you nor Marco submitter have so far answered the question I\nraised in\n\n  http://thread.gmane.org/gmane.comp.version-control.git/191155\n\nwhich can be summarized as: please make a case -- and put it in the\nmessage! -- for or against making this configurable.  Is there a speed\ntradeoff?  (However, you could steal some of Daniel Stenberg's\nreasoning!)\n\nNote that Marco (the submitter in the first one) has told me privately\nthat he could not pursue this further right now, so I suppose he'd be\nhappy if you could finish it.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"185638","messageId":"8762eq50hg.fsf@thomas.inf.ethz.ch","threadId":"29774","inReplyTo":"4F4D19CC.5030303@seap.minhap.es","subject":"Re: [PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2012-02-28T17:30:51Z","receivedAt":"2012-02-28T17:30:51Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es> writes:\n\n> On 02/28/2012 03:32 PM, Thomas Rast wrote:\n>> Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es> writes:\n>> \n>>> -\tif (curl_http_proxy)\n>>> +\tif (curl_http_proxy) {\n>>>  \t\tcurl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);\n>>> +\t\tcurl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);\n>>> +\t}\n>> \n>> There was another attempt at doing the same very recently:\n>> \n>>   http://thread.gmane.org/gmane.comp.version-control.git/191140\n>> \n>> I could swear there was a second one, but apparently that was you.\n>> Neither you nor Marco submitter have so far answered the question I\n>> raised in\n>> \n>>   http://thread.gmane.org/gmane.comp.version-control.git/191155\n>> \n>> which can be summarized as: please make a case -- and put it in the\n>> message! -- for or against making this configurable.  Is there a speed\n>> tradeoff?  (However, you could steal some of Daniel Stenberg's\n>> reasoning!)\n>\n> I don't see any reason to make this configurable, [snip]\n\nSorry for not making this clear, but you don't have to explain it to me\nin the list archives; rather, the commit message should sufficiently\ntake care of it.  That is, I was objecting to your (lack of a) commit\nmessage.\n\nThe argument you need to counter here is (Daniel explains this) curl\ndoes an extra roundtrip to the proxy to determine which protocols work,\nwhich is a little extra cost.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"185645","messageId":"4F4D19CC.5030303@seap.minhap.es","threadId":"29774","inReplyTo":"8762er6nb2.fsf@thomas.inf.ethz.ch","subject":"Re: [PATCH 1/3] http: authenticate on NTLM proxies and others suppported, by CuRL","fromName":"Nelson Benitez Leon","fromEmail":"nelsonjesus.benitez@seap.minhap.es","sentAt":"2012-02-28T18:15:40Z","receivedAt":"2012-02-28T18:15:40Z","isPatch":true,"sender":{"key":"nelsonjesus.benitez@seap.minhap.es","avatar":null},"body":"On 02/28/2012 03:32 PM, Thomas Rast wrote:\n> Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es> writes:\n> \n>> -\tif (curl_http_proxy)\n>> +\tif (curl_http_proxy) {\n>>  \t\tcurl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);\n>> +\t\tcurl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);\n>> +\t}\n> \n> There was another attempt at doing the same very recently:\n> \n>   http://thread.gmane.org/gmane.comp.version-control.git/191140\n> \n> I could swear there was a second one, but apparently that was you.\n> Neither you nor Marco submitter have so far answered the question I\n> raised in\n> \n>   http://thread.gmane.org/gmane.comp.version-control.git/191155\n> \n> which can be summarized as: please make a case -- and put it in the\n> message! -- for or against making this configurable.  Is there a speed\n> tradeoff?  (However, you could steal some of Daniel Stenberg's\n> reasoning!)\n\nI don't see any reason to make this configurable, CuRL people made this\ncool CURLAUTH_ANY option that automatically chooses the best auth method\nfrom among those the server supports, that means you don't have to \ninvestigate if your proxy is using Basic, Digest or NTLM methods, and\nuse a specific curl option for each of them, instead curl\nwill ask the proxy and use the appropiate, and it will only do that if \nyou are using a proxy (i.e. you've set CURLOPT_PROXY or you have http_proxy\nenv var), also curl will not try to authenticate if you've not provided\nusername or password in the proxy string, as I've been told here[1]..\n\nso, setting CURLOPT_PROXYAUTH = CURLAUTH_ANY will not affect the speed of\nnormal curl use, only if 1) you are using a proxy and 2) your proxy requires\nauthentication, only then curl will just make two or three roundtrips to find out\nthe auth method the proxy is using, that is a tiny cost compared to having the\nuser find out the proxy auth type and set an specifically config option to enable\nthat type.\n\nSo I would call CURLAUTH_ANY as out-of-the-box proxy support, and I don't want it\nactivated from a config option, I want it to still be out-of-the-box in git also..\n\n[1] https://bugzilla.redhat.com/show_bug.cgi?id=769254#c6\n"}]}