aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/lib/url.c b/lib/url.c
index a78e27fb9..01e217cd9 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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? */