]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux-h2: send END_STREAM when the trailers are dropped
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Dec 2026 14:26:27 +0000 (15:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Dec 2026 14:54:41 +0000 (15:54 +0100)
commit3b6c63b9276354069d6dffa319eab2ca982e9fa4
tree8a9b4e6ee2549745abe2af03860ca2f0c9c80600
parent91a4be224275006f3497af9627cf8ab605ec4da9
BUG/MEDIUM: mux-h2: send END_STREAM when the trailers are dropped

When "option http-drop-response-trailers" or "option
http-drop-request-trailers" was set, the trailers loop in
h2s_make_trailers() was skipped. But since the commit 221c40bbf ("MINOR:
htx: Add a noop block to carry the EOM flag on an empty message"), this
loop is also responsible for retrieving the EOM flag on the EOT block.
So, when the trailers were dropped, the end of the message was never
detected and nothing was emitted to close the stream. The H2 clients
received a RST_STREAM(CANCEL) on complete responses and, on the server
side, a 504 was returned after the server timeout. Because a chunked H1
message always ends with an EOT block, every chunked H1 message was
affected, with or without trailers.

Now, the loop is always performed to find the EOT block, but the
trailers are skipped when they must be dropped. In that case, an empty
DATA frame with the ES flag is emitted.

No backport needed.
reg-tests/http-messaging/drop_trailers.vtc
src/mux_h2.c