diff options
author | Daniel Stenberg <daniel@haxx.se> | 2012-03-21 23:22:39 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-03-22 00:12:37 +0100 |
commit | c83de6d07625b813e3bbc31f9a0827c3a0007355 (patch) | |
tree | d55e987d195fc5dd5d0c3d23b4cc306c48667db6 /lib/http.c | |
parent | 805788e0434f4f09d8049c51000af604efb800ed (diff) | |
download | curl-c83de6d07625b813e3bbc31f9a0827c3a0007355.tar.gz |
CONNECT: fix multi interface regression
The refactoring of HTTP CONNECT handling in commit 41b0237834232 that
made it protocol independent broke it for the multi interface. This fix
now introduce a better state handling and moved some logic to the
http_proxy.c source file.
Reported by: Yang Tse
Bug: http://curl.haxx.se/mail/lib-2012-03/0162.html
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/http.c b/lib/http.c index c7a6df015..a8b3e28fd 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1309,10 +1309,17 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) function to make the re-use checks properly be able to check this bit. */ conn->bits.close = FALSE; - if(conn->bits.tunnel_connecting) { + if(data->state.used_interface == Curl_if_multi) { + /* when the multi interface is used, the CONNECT procedure might not have + been completed */ + result = Curl_proxy_connect(conn); + if(result) + return result; + } + + if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) /* nothing else to do except wait right now - we're not done here. */ return CURLE_OK; - } if(conn->given->flags & PROTOPT_SSL) { /* perform SSL initialization */ |