diff options
author | Stefan Eissing <stefan@eissing.org> | 2023-03-06 12:44:45 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-03-07 12:50:31 +0100 |
commit | 7c5637b8b4b8a5a125ba1556e50e4b092075a6a7 (patch) | |
tree | e671c307e08cc7eb2418a703a1870001d8c31855 /lib/vquic/curl_msh3.c | |
parent | 6466071e8e85011057dfad4cc860029e391edeb8 (diff) | |
download | curl-7c5637b8b4b8a5a125ba1556e50e4b092075a6a7.tar.gz |
url: fix logic in connection reuse to deny reuse on "unclean" connections
- add parameter to `conn_is_alive()` cfilter method that returns
if there is input data waiting on the connection
- refrain from re-using connnection from the cache that have
input pending
- adapt http/2 and http/3 alive checks to digest pending input
to check the connection state
- remove check_cxn method from openssl as that was just doing
what the socket filter now does.
- add tests for connection reuse with special server configs
Closes #10690
Diffstat (limited to 'lib/vquic/curl_msh3.c')
-rw-r--r-- | lib/vquic/curl_msh3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/vquic/curl_msh3.c b/lib/vquic/curl_msh3.c index a74f7ceaa..530899977 100644 --- a/lib/vquic/curl_msh3.c +++ b/lib/vquic/curl_msh3.c @@ -769,11 +769,13 @@ static CURLcode cf_msh3_query(struct Curl_cfilter *cf, } static bool cf_msh3_conn_is_alive(struct Curl_cfilter *cf, - struct Curl_easy *data) + struct Curl_easy *data, + bool *input_pending) { struct cf_msh3_ctx *ctx = cf->ctx; (void)data; + *input_pending = FALSE; return ctx && ctx->sock[SP_LOCAL] != CURL_SOCKET_BAD && ctx->qconn && ctx->connected; } |