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.
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)) {