From: Daniel Stenberg Date: Mon, 4 Sep 2017 21:43:05 +0000 (+0200) Subject: http-proxy: when not doing CONNECT, that phase is done immediately X-Git-Tag: curl-7_56_0~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ef50ee0a436aeaa05adc9d78fda57e3ef53233e;p=thirdparty%2Fcurl.git http-proxy: when not doing CONNECT, that phase is done immediately `conn->connect_state` is NULL when doing a regular non-CONNECT request over the proxy and should therefor be considered complete at once. Fixes #1853 Closes #1862 Reported-by: Lawrence Wagerfield --- diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 7b27604460..77532e38df 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -137,7 +137,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) bool Curl_connect_complete(struct connectdata *conn) { - return conn->connect_state && + return !conn->connect_state || (conn->connect_state->tunnel_state == TUNNEL_COMPLETE); }