From: Christopher Faulet Date: Thu, 3 Dec 2026 09:48:42 +0000 (+0100) Subject: BUG/MINOR: h3: use the right option to drop the trailers on the backend side X-Git-Url: https://git.kaiwu.me/web/%7Bsubstring-before(@doc,%20'.xml')%7D.html?a=commitdiff_plain;h=233f7060c20c96c37020ba9f537f9d990379febe;p=haproxy.git BUG/MINOR: h3: use the right option to drop the trailers on the backend side In h3_resp_trailers_send(), the trailers were dropped when the option "http-drop-response-trailers" was set on the proxy, whatever the side. But on the backend side, the request trailers are sent. So on a QUIC backend, "http-drop-request-trailers" was ignored and the request trailers were dropped if "http-drop-response-trailers" was set, for instance on a listen section. Now, like for the H2 mux, the option depending on the side is checked. This patch must be backported to 3.3. --- diff --git a/src/h3.c b/src/h3.c index a7d370827..0f64487e1 100644 --- a/src/h3.c +++ b/src/h3.c @@ -3108,8 +3108,12 @@ static int h3_resp_trailers_send(struct qcs *qcs, struct htx *htx, char *fin) hdr = 0; - /* Skip the trailers because the corresponding conf option was set */ - if (qcs->qcc->proxy->options & PR_O_HTTP_DROP_RES_TRLS) + /* Skip the trailers because the corresponding conf option was set. On + * the frontend side, these are response trailers. On the backend side, + * these are request trailers. + */ + if ((!(qcs->qcc->flags & QC_CF_IS_BACK) && (qcs->qcc->proxy->options & PR_O_HTTP_DROP_RES_TRLS)) || + ((qcs->qcc->flags & QC_CF_IS_BACK) && (qcs->qcc->proxy->options & PR_O_HTTP_DROP_REQ_TRLS))) goto skip_trailers; for (blk = htx_get_head_blk(htx); blk; blk = htx_get_next_blk(htx, blk)) {