aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-04 23:43:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-09-07 16:11:38 +0200
commit9ef50ee0a436aeaa05adc9d78fda57e3ef53233e (patch)
tree0c4be823f01720ba46a00caf14607796a6cb3359
parentf4a623825bf18bc3a6b11193230e44983d20446a (diff)
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
-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 7b2760446..77532e38d 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);
}