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.