BUG/MINOR: mux-h1: Send a 400-bad-request on shutdown before the first request
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Oct 2023 13:34:04 +0000 (15:34 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Oct 2023 15:16:43 +0000 (17:16 +0200)
commit7629e82c6e61f7e5af3c9446699c31d88519e05e
treeae00d1479f37bdf27c9fb94a95a8a4f96fa37159
parent2a51d5b6ea91145aab04280f868c30c2aa444f05
BUG/MINOR: mux-h1: Send a 400-bad-request on shutdown before the first request

Except if we must silently ignore empty connections by enabling
http-ignore-probes or dontlognull options, when a client connection is
closed before the first request, a 400-bad-request response must be sent
with the corresponding log message. However, that is broken since the commit
fc473a6453 ("MEDIUM: mux-h1: Rely on the H1C to deal with shutdown for
reads").

The bug is subtle. Parsing errors are no longer reported on connection errors
before the first request while it should be.

This patch must be backported where the above commit is (as far as 2.7).
src/mux_h1.c