http_trailers_to_htx() was made from h2_make_htx_trailers(), so it's
expected that we can get rid of the latter in favor of the former to
aim towards a generic parser.
For now we don't exploit the extended return codes, we only check for
HTTP_PRS_SUCCESS to detect parsing failures.
}
/* Trailers terminate a DATA sequence */
- if (h2_make_htx_trailers(list, htx) <= 0) {
+ if (http_trailers_to_htx(list, htx) != HTTP_PRS_SUCCESS) {
h2c_report_glitch(h2c, 1, "failed to append HTX trailers into rxbuf");
TRACE_STATE("failed to append HTX trailers into rxbuf", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2S_ERR, h2c->conn);
htx->flags |= HTX_FL_PARSING_ERROR;