summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-04 23:43:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-09-04 23:43:05 +0200
commit637ea1f6deaf4ad78fb5c9f4d7c7aea8299fc86f (patch)
tree933f70dfdf127a1a6a9725500048c2f82ba3303f
parent7b81623660aed73512814b4c2fcf7a13a2bdc3d8 (diff)
downloadcurl-bagder/http-proxy-connect-CONNECT.tar.gz
http-proxy: when not doing CONNECT, that phase is done immediatelybagder/http-proxy-connect-CONNECT
`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 Reported-by: Lawrence Wagerfield
-rw-r--r--lib/http_proxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 5a1dc0b86..a91933493 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);
}