From 32eddae1b56bbd5f3e5921cbe10897f6ed76dde4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Jun 2017 23:02:26 +0200 Subject: http-proxy: do the HTTP CONNECT process entirely non-blocking Mentioned as a problem since 2007 (8f87c15bdac63) and of course it existed even before that. --- lib/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index b33579c70..e7b7a02c8 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3020,7 +3020,7 @@ static void conn_free(struct connectdata *conn) Curl_safefree(conn->http_proxy.host.rawalloc); /* http proxy name buffer */ Curl_safefree(conn->socks_proxy.host.rawalloc); /* socks proxy name buffer */ Curl_safefree(conn->master_buffer); - Curl_safefree(conn->connect_buffer); + Curl_safefree(conn->connect_state); conn_reset_all_postponed_data(conn); @@ -4010,7 +4010,7 @@ CURLcode Curl_protocol_connect(struct connectdata *conn, return CURLE_OK; if(conn->bits.tunnel_proxy && conn->bits.httpproxy && - (conn->tunnel_state[FIRSTSOCKET] != TUNNEL_COMPLETE)) + Curl_connect_ongoing(conn)) /* when using an HTTP tunnel proxy, await complete tunnel establishment before proceeding further. Return CURLE_OK so we'll be called again */ return CURLE_OK; -- cgit v1.2.1