From 7c5637b8b4b8a5a125ba1556e50e4b092075a6a7 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Mon, 6 Mar 2023 12:44:45 +0100 Subject: 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 --- lib/vquic/curl_msh3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/vquic/curl_msh3.c') 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; } -- cgit v1.2.1