From: Christopher Faulet Date: Tue, 21 Oct 2025 12:22:25 +0000 (+0200) Subject: BUG/MEDIUM: h1-htx: Don't set HTX_FL_EOM flag on 1xx informational messages X-Git-Tag: v3.3-dev11~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18ece2b4249956cb759552ff831d3822b664f223;p=thirdparty%2Fhaproxy.git 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. --- 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)) {