{"thread":{"id":"30410","subject":"[PATCH 4/6] http: handle proxy authentication failure (error 407)","startedAt":"2012-05-03T16:40:14Z","lastAt":"2012-05-04T07:23:29Z","messageCount":2,"participants":["Nelson Benitez Leon","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"190648","messageId":"4FA2B4EE.6010008@seap.minhap.es","threadId":"30410","inReplyTo":null,"subject":"[PATCH 4/6] http: handle proxy authentication failure (error 407)","fromName":"Nelson Benitez Leon","fromEmail":"nelsonjesus.benitez@seap.minhap.es","sentAt":"2012-05-03T16:40:14Z","receivedAt":"2012-05-03T16:40:14Z","isPatch":true,"sender":{"key":"nelsonjesus.benitez@seap.minhap.es","avatar":null},"body":"Handle http 407 error code by asking for credentials and\nretrying request in case credentials were not present, or\nmarking credentials as rejected if they were already provided.\n\nSigned-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n http.c |    9 +++++++++\n 1 files changed, 9 insertions(+), 0 deletions(-)\n\ndiff --git a/http.c b/http.c\nindex 22ffe0c..c87c66c 100644\n--- a/http.c\n+++ b/http.c\n@@ -879,6 +879,15 @@ static int http_request(const char *url, void *result, int target, int options)\n \t\t\t\tinit_curl_http_auth(slot->curl);\n \t\t\t\tret = HTTP_REAUTH;\n \t\t\t}\n+\t\t} else if (results.http_code == 407) { /* Proxy authentication failure */\n+\t\t\tif (proxy_auth.username && proxy_auth.password) {\n+\t\t\t\tcredential_reject(&proxy_auth);\n+\t\t\t\tret = HTTP_NOAUTH;\n+\t\t\t} else {\n+\t\t\t\tcredential_fill(&proxy_auth);\n+\t\t\t\tset_proxy_auth(slot->curl);\n+\t\t\t\tret = HTTP_REAUTH;\n+\t\t\t}\n \t\t} else {\n \t\t\tif (!curl_errorstr[0])\n \t\t\t\tstrlcpy(curl_errorstr,\n-- \n1.7.7.6\n"},{"id":"190730","messageId":"20120504072329.GD21895@sigill.intra.peff.net","threadId":"30410","inReplyTo":"4FA2B4EE.6010008@seap.minhap.es","subject":"Re: [PATCH 4/6] http: handle proxy authentication failure (error 407)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-05-04T07:23:29Z","receivedAt":"2012-05-04T07:23:29Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 03, 2012 at 06:40:14PM +0200, Nelson Benitez Leon wrote:\n\n> Handle http 407 error code by asking for credentials and\n> retrying request in case credentials were not present, or\n> marking credentials as rejected if they were already provided.\n\nThis one looks good to me.\n\n-Peff\n"}]}