]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
- Constantine Sapuntzakis fixed a bug when doing proxy CONNECT with the multi
authorDaniel Stenberg <daniel@haxx.se>
Sat, 23 Aug 2008 12:11:38 +0000 (12:11 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 23 Aug 2008 12:11:38 +0000 (12:11 +0000)
  interface, and the proxy would send Connection: close during the
  authentication phase.  http://curl.haxx.se/bug/view.cgi?id=2069047

CHANGES
RELEASE-NOTES
configure.ac
lib/mk-ca-bundle.pl
lib/multi.c

diff --git a/CHANGES b/CHANGES
index 10d5c77875865d95327598f203c9c8708cbeb1c0..e8f26032a29fa69aee3d1538301f1fad61cf9b3a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,11 @@
 
                                   Changelog
 
+Daniel Stenberg (23 Aug 2008)
+- Constantine Sapuntzakis fixed a bug when doing proxy CONNECT with the multi
+  interface, and the proxy would send Connection: close during the
+  authentication phase.  http://curl.haxx.se/bug/view.cgi?id=2069047
+
 Daniel Fandrich (22 Aug 2008)
 - Fixed a problem when --dump-header - was given with more than one URL,
   which caused an error when the second header was dumped due to stdout
index 1d8f90ce92fc22cf4e9c5b522c2f86ce2b1e69fa..d082085c31ab2c5dfba2d8dd9cbc7068ebf5013e 100644 (file)
@@ -57,6 +57,7 @@ This release includes the following bugfixes:
  o memory leak in libcurl on Windows built with OpenSSL
  o improved curl_m*printf() integral data type size and signedness handling
  o error when --dump-header - used with more than one URL
+ o proxy closing connect during CONNECT with auth with the multi interface
 
 This release includes the following known bugs:
 
index 2959b68c83db1dc8554fd63b29f3f447f89280db..0e29b9e3e9fd6bb3be2f43cdb89d3711d1418a62 100644 (file)
@@ -2006,6 +2006,13 @@ CURL_CONFIGURE_LONG
 AC_CHECK_SIZEOF(time_t)
 AC_CHECK_SIZEOF(off_t)
 
+dnl now check if curl_off_t is larger than off_t
+
+if test $ac_cv_sizeof_off_t -ge $ac_cv_sizeof_curl_off_t; then
+  AC_MSG_WARN([curl_off_t was detected to be larger than off_t.])
+fi
+
+
 AC_CHECK_TYPE(long long,
    [AC_DEFINE(HAVE_LONGLONG, 1,
       [Define to 1 if the compiler supports the 'long long' data type.])]
index 279dd447e6d697de8e66d7b388f7002c93563f50..4d41af9d3be87e72aaa69274f5b0b59f59229dcf 100755 (executable)
@@ -163,7 +163,7 @@ while (<TXT>) {
             . MIME::Base64::encode($data)
             . "-----END CERTIFICATE-----\n";
     open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
-    print CRT "\n$caname\n";
+    print CRT "\n\"$caname\"\n";
     print CRT ("=" x length($caname) . "\n");
     if (!$opt_t) {
       print CRT $pem;
index a2a4eb50bd248b5d77a31ce492f1ed44500a80de..f49d42699e986f2efc11fd007f04c587d29ae58a 100644 (file)
@@ -1009,7 +1009,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       /* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */
       easy->result = Curl_http_connect(easy->easy_conn, &protocol_connect);
 
-      if(CURLE_OK == easy->result) {
+      if(easy->easy_conn->bits.proxy_connect_closed) {
+        /* reset the error buffer */
+        if(easy->easy_handle->set.errorbuffer)
+          easy->easy_handle->set.errorbuffer[0] = '\0';
+        easy->easy_handle->state.errorbuf = FALSE;
+
+       easy->result = CURLE_OK;
+       result = CURLM_CALL_MULTI_PERFORM;
+       multistate(easy, CURLM_STATE_CONNECT);
+      }
+      else if (CURLE_OK == easy->result) {
         if(!easy->easy_conn->bits.tunnel_connecting)
           multistate(easy, CURLM_STATE_WAITCONNECT);
       }