From 18ece2b4249956cb759552ff831d3822b664f223 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 21 Oct 2025 14:22:25 +0200 Subject: [PATCH] BUG/MEDIUM: h1-htx: Don't set HTX_FL_EOM flag on 1xx informational messages 1xx informational messages are part of the HTTP response. It is not expected to have a HX_FL_EOM flag set after parsing such messages when received from a server. It is espacially important whne an informational messages is processed on client side while the final response was not recieved yet, to not erroneously detect the end of the message. The HTTP multiplexers seem to ignore the HTX_FL_EOM flag for information messages, but it remains an error from the HTX specification point of view. So it must be fixed. While it should theorically be backported as far as 3.0, it is a good idea to not do so for now because no bug was reported and regressions may happen. --- src/h1_htx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/h1_htx.c b/src/h1_htx.c index 8c8723dad..1e67b63c3 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -322,10 +322,11 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx h1m->flags |= H1_MF_XFER_LEN; h1m->curr_len = h1m->body_len = 0; - if (code >= 200) + if (code >= 200) { flags |= HTX_SL_F_BODYLESS_RESP; + htx->flags |= HTX_FL_EOM; + } h1m->state = H1_MSG_DONE; - htx->flags |= HTX_FL_EOM; } else { if (h1m->flags & (H1_MF_CLEN|H1_MF_CHNK)) {