From cbf58d88d0a84042d9dd8a7a6b1644f15242cf02 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 18 Feb 2007 23:02:42 +0000 Subject: - Jeff Pohlmeyer identified two problems: first a rather obscure problem with the multi interface and connection re-use that could make a curl_multi_remove_handle() ruin a pointer in another handle. The second problem was less of an actual problem but more of minor quirk: the re-using of connections wasn't properly checking if the connection was marked for closure. --- lib/http.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index 8b9e5665c..638c5fad2 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1403,6 +1403,10 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) data=conn->data; + /* We default to persistent connections. We set this already in this connect + function to make the re-use checks properly be able to check this bit. */ + conn->bits.close = FALSE; + /* If we are not using a proxy and we want a secure connection, perform SSL * initialization & connection now. If using a proxy with https, then we * must tell the proxy to CONNECT to the host we want to talk to. Only @@ -1674,9 +1678,6 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) else http = data->reqdata.proto.http; - /* We default to persistent connections */ - conn->bits.close = FALSE; - if ( (conn->protocol&(PROT_HTTP|PROT_FTP)) && data->set.upload) { httpreq = HTTPREQ_PUT; -- cgit v1.2.3