From c6df78886654c2b5672612f114fadb9402b7027f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 Jan 2008 23:33:45 +0000 Subject: - Kevin Reed filed bug report #1879375 (http://curl.haxx.se/bug/view.cgi?id=1879375) which describes how libcurl got lost in this scenario: proxy tunnel (or HTTPS over proxy), ask to do any proxy authentication and the proxy replies with an auth (like NTLM) and then closes the connection after that initial informational response. libcurl would not properly re-initialize the connection to the proxy and continue the auth negotiation like supposed. It does now however, as it will now detect if one or more authentication methods were available and asked for, and will thus retry the connection and continue from there. - I made the progress callback get called properly during proxy CONNECT. --- lib/http.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/http.c b/lib/http.c index 89f5c7615..d537407d2 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1409,8 +1409,15 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, keepon = FALSE; else if(gotbytes <= 0) { keepon = FALSE; - error = SELECT_ERROR; - failf(data, "Proxy CONNECT aborted"); + if(data->set.proxyauth && data->state.authproxy.avail) { + /* proxy auth was requested and there was proxy auth available, + then deem this as "mere" proxy disconnect */ + conn->bits.proxy_connect_closed = TRUE; + } + else { + error = SELECT_ERROR; + failf(data, "Proxy CONNECT aborted"); + } } else { /* @@ -1590,6 +1597,8 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } break; } /* switch */ + if(Curl_pgrsUpdate(conn)) + return CURLE_ABORTED_BY_CALLBACK; } /* while there's buffer left and loop is requested */ if(error) -- cgit v1.2.3