summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-08-27 17:42:40 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-08-27 17:42:40 +0200
commitaf3c4231e25330836f013c5236b7d24d04dfbd1c (patch)
tree71b20b3f4b10dfc2caa325c88ce2d0bd3f832eb9
parent5dc594e44f73b1726cabca6a4395323f972e416d (diff)
downloadcurl-bagder/connect-getsock.tar.gz
http_proxy: only wait for writable socket while sending requestbagder/connect-getsock
Otherwise it would wait socket writability even after the entire CONNECT request has sent and make curl basically busy-loop while waiting for a response to come back. The previous fix attempt in #7484 (c27a70a591a4) was inadequate. Reported-by: zloi-user on github Reported-by: Oleguer Llopart Fixes #7589
-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 9ce5ee848..c4fba9d06 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -148,7 +148,7 @@ int Curl_connect_getsock(struct connectdata *conn)
DEBUGASSERT(conn->connect_state);
http = &conn->connect_state->http_proxy;
- if(http->sending)
+ if(http->sending == HTTPSEND_REQUEST)
return GETSOCK_WRITESOCK(0);
return GETSOCK_READSOCK(0);