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/url.c | |
parent | 805788e0434f4f09d8049c51000af604efb800ed (diff) |
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/url.c')
-rw-r--r-- | lib/url.c | 33 |
1 files changed, 3 insertions, 30 deletions
@@ -3391,36 +3391,9 @@ CURLcode Curl_protocol_connect(struct connectdata *conn, is later set again for the progress meter purpose */ conn->now = Curl_tvnow(); - if(conn->bits.tunnel_proxy && conn->bits.httpproxy) { -#ifndef CURL_DISABLE_PROXY - /* for [protocol] tunneled through HTTP proxy */ - struct HTTP http_proxy; - void *prot_save; - - /* BLOCKING */ - /* We want "seamless" operations through HTTP proxy tunnel */ - - /* Curl_proxyCONNECT is based on a pointer to a struct HTTP at the - * member conn->proto.http; we want [protocol] through HTTP and we have - * to change the member temporarily for connecting to the HTTP - * proxy. After Curl_proxyCONNECT we have to set back the member to the - * original pointer - */ - prot_save = data->state.proto.generic; - memset(&http_proxy, 0, sizeof(http_proxy)); - data->state.proto.http = &http_proxy; - - result = Curl_proxyCONNECT(conn, FIRSTSOCKET, - conn->host.name, conn->remote_port); - - data->state.proto.generic = prot_save; - - if(CURLE_OK != result) - return result; -#else - return CURLE_NOT_BUILT_IN; -#endif - } + result = Curl_proxy_connect(conn); + if(result) + return result; if(conn->handler->connect_it) { /* is there a protocol-specific connect() procedure? */ |