aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-08-23 12:11:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-08-23 12:11:38 +0000
commit13dc82b9d4e3280e9fbb038027169a544fcbd171 (patch)
tree501aab02f8a678b72ebc83b2d85fc47e394a3672 /lib
parenta243dd45873cd226a0da2ca4acf6b140e4065950 (diff)
- 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
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mk-ca-bundle.pl2
-rw-r--r--lib/multi.c12
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl
index 279dd447e..4d41af9d3 100755
--- a/lib/mk-ca-bundle.pl
+++ b/lib/mk-ca-bundle.pl
@@ -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;
diff --git a/lib/multi.c b/lib/multi.c
index a2a4eb50b..f49d42699 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -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);
}