]> granicus.if.org Git - curl/commitdiff
http-proxy: when not doing CONNECT, that phase is done immediately
authorDaniel Stenberg <daniel@haxx.se>
Mon, 4 Sep 2017 21:43:05 +0000 (23:43 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 7 Sep 2017 14:11:38 +0000 (16:11 +0200)
`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
lib/http_proxy.c

index 7b27604460867ad8d08cf2649143e3d75f6087b7..77532e38df7d0f2ba940c0818bfc06e7549b9b07 100644 (file)
@@ -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);
 }