- Kevin Reed filed bug report #1879375
authorDaniel Stenberg <daniel@haxx.se>
Fri, 25 Jan 2008 23:33:45 +0000 (23:33 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 25 Jan 2008 23:33:45 +0000 (23:33 +0000)
  (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.

CHANGES
RELEASE-NOTES
lib/http.c

diff --git a/CHANGES b/CHANGES
index 939f58c..69069e4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,20 @@
 
                                   Changelog
 
+Daniel S (26 Jan 2008)
+- 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.
+
 Daniel S (23 Jan 2008)
 - Igor Franchuk pointed out that CURLOPT_COOKIELIST set to "ALL" leaked
   memory, and so did "SESS". Fixed now.
index 4cce7aa..2152344 100644 (file)
@@ -61,6 +61,8 @@ This release includes the following bugfixes:
  o curl_multi_remove_handle() on a handle that is in used for a pipeline now
    break that pipeline
  o CURLOPT_COOKIELIST memory leaks
+ o progress meter/callback during http proxy CONNECT requests
+ o auth for http proxy when the proxy closes connection after first response
 
 This release includes the following known bugs:
 
@@ -86,6 +88,7 @@ advice from friends like these:
  Gilles Blanc, David Wright, Vikram Saxena, Mateusz Loskot, Gary Maxwell,
  Dmitry Kurochkin, Mohun Biswas, Richard Atterer, Maxim Perenesenko,
  Daniel Egger, Jeff Johnson, Nikitinskit Dmitriy, Georg Lippitsch, Eric Landes,
- Joe Malicki, Nathan Coulter, Lau Hang Kin, Judson Bishop, Igor Franchuk
+ Joe Malicki, Nathan Coulter, Lau Hang Kin, Judson Bishop, Igor Franchuk,
+ Kevin Reed
  
         Thanks! (and sorry if I forgot to mention someone)
index 89f5c76..d537407 100644 (file)
@@ -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)