From 6d98108aa970e448864c9b312e58a5319b3b38b1 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 2 Oct 2024 09:57:34 +0200 Subject: [PATCH] BUG/MINOR: http-ana: Disable fast-fwd for unfinished req waiting for upgrade If a request is waiting for a protocol upgrade but it is not finished, the data fast-forwarding is disabled. Otherwise, the request analyzers will miss the end of the message. This case is possible since the commit 01fb1a54 ("BUG/MEDIUM: mux-h1/mux-h2: Reject upgrades with payload on H2 side only"). Indeed, before, a protocol upgrade was not allowed for request with payload. But it is now possible and this comes with a side-effect. It is not really satisfying but for now there is no other way to sync the muxes and the applicative stream. It seems to be a reasonnable fix for now, waiting for a deeper refactoring. This patch must be backported with the commit above. (cherry picked from commit cea1379cf1fcd5fd9c3b3b104f4c5374bc44bce2) Signed-off-by: Christopher Faulet --- src/http_ana.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http_ana.c b/src/http_ana.c index aa56184..fcccb1e 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -942,7 +942,8 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit) } else { c_adv(req, htx->data - co_data(req)); - if ((global.tune.options & GTUNE_USE_FAST_FWD) && (msg->flags & HTTP_MSGF_XFER_LEN)) + if ((global.tune.options & GTUNE_USE_FAST_FWD) && (msg->flags & HTTP_MSGF_XFER_LEN) && + (!(msg->flags & HTTP_MSGF_CONN_UPG) || (htx->flags & HTX_FL_EOM))) channel_htx_forward_forever(req, htx); } -- 1.7.10.4