From: Willy Tarreau Date: Tue, 8 Sep 2026 08:03:20 +0000 (+0200) Subject: MEDIUM: mux-h2: rely on the generic trailers parser X-Git-Tag: v3.5-dev7~61 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=7ca28521fe1c0bff77a2d66b52679d7aa1d57d2a;p=haproxy.git MEDIUM: mux-h2: rely on the generic trailers parser 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. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index d336fcad3..251292e20 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -6484,7 +6484,7 @@ next_frame: } /* 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;