From: Christopher Faulet Date: Wed, 23 Sep 2026 05:34:13 +0000 (+0200) Subject: BUG/MEDIUM: h1-htx: Don't report EOM for H1 interim responses during parsing X-Git-Tag: v3.5-dev8~133 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=76454cbbf4227291db0ca3514f43a745eaad3f86;p=haproxy.git BUG/MEDIUM: h1-htx: Don't report EOM for H1 interim responses during parsing Commit b7467ca91 ("MAJOR: htx: Use htx_set_eom() instead of setting HTX_FL_EOM by hand") introduced a regression. During H1 response parsing, the end of the message was reported in 1XX interim responses, while it should not. Because of this issue, a BUG_ON() was triggered on the final response parsing. The calls to htx_set_eom() function in h1_postparse_req_hdrs() and h1_postparse_res_hdrs() was factorized to be always set when the parser reached H1_MSG_DONE state. This was obviously wrong for 1XX interim messages. Thanks to Adam Crawford for reporting this issue. It is a 3.5-specific issue. No backport needed. --- diff --git a/src/h1_htx.c b/src/h1_htx.c index 24daf0a3c..b1f500043 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -377,7 +377,10 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx goto error; sl->info.res.status = code; - if (h1m->state == H1_MSG_DONE) + /* The EOM must not be reported for 1xx interim responses. The final + * response is expected next. + */ + if (h1m->state == H1_MSG_DONE && (code >= 200 || code == 101)) htx_set_eom(htx); return 1;