mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:03:32 +03:00
url: fix connection reuse for HTTP/2 upgrades
Normally, when a connection's filters have all connected, the multiplex status is determined. However, HTTP/2 Upgrade: requests will only do this when the first server response has been received. The current connection reuse mechanism does not accomodate that and when the time between connect and response is large enough, connection reuse may not happen as desired. See test case 2405 failures, such as in https://github.com/curl/curl/actions/runs/10629497461/job/29467166451 Add 'conn->bits.asks_multiplex' as indicator that a connection is still being evaluated for mulitplexing, so that new transfers may wait on this to be cleared. Closes #14739
This commit is contained in:
parent
76212cbf3e
commit
00ef607326
4 changed files with 8 additions and 1 deletions
|
|
@ -907,7 +907,10 @@ static bool url_match_conn(struct connectdata *conn, void *userdata)
|
|||
* connections that do not use this feature */
|
||||
return FALSE;
|
||||
|
||||
if(!Curl_conn_is_connected(conn, FIRSTSOCKET)) {
|
||||
if(!Curl_conn_is_connected(conn, FIRSTSOCKET) ||
|
||||
conn->bits.asks_multiplex) {
|
||||
/* Not yet connected, or not yet decided if it multiplexes. The later
|
||||
* happens for HTTP/2 Upgrade: requests that need a response. */
|
||||
if(match->may_multiplex) {
|
||||
match->seen_pending_conn = TRUE;
|
||||
/* Do not pick a connection that has not connected yet */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue