]> granicus.if.org Git - curl/commitdiff
http: Don't wait on CONNECT when there is no proxy
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Fri, 18 Aug 2017 08:43:02 +0000 (10:43 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Aug 2017 13:25:22 +0000 (15:25 +0200)
Since curl 7.55.0, NetworkManager almost always failed its connectivity
check by timeout. I bisected this to 5113ad04 (http-proxy: do the HTTP
CONNECT process entirely non-blocking).

This patch replaces !Curl_connect_complete with Curl_connect_ongoing,
which returns false if the CONNECT state was left uninitialized and lets
the connection continue.

Closes #1803
Fixes #1804

Also-fixed-by: Gergely Nagy
lib/http.c

index 35c7c3d43f854daa01bfd72319ed5f1898376cdd..3e331327834d50cbacf872771e8e7c5457f24b3d 100644 (file)
@@ -1371,7 +1371,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
   if(CONNECT_FIRSTSOCKET_PROXY_SSL())
     return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */
 
-  if(!Curl_connect_complete(conn))
+  if(Curl_connect_ongoing(conn))
     /* nothing else to do except wait right now - we're not done here. */
     return CURLE_OK;