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.
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;