diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-08-27 17:42:40 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-08-27 23:34:37 +0200 |
commit | 4fee6c644fd9f807fcbe690ccf1c2617a78dfe93 (patch) | |
tree | 71b20b3f4b10dfc2caa325c88ce2d0bd3f832eb9 | |
parent | 5dc594e44f73b1726cabca6a4395323f972e416d (diff) | |
download | curl-4fee6c644fd9f807fcbe690ccf1c2617a78dfe93.tar.gz |
http_proxy: only wait for writable socket while sending request
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
Closes #7647
-rw-r--r-- | lib/http_proxy.c | 2 |
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); |