BUG/MEDIUM: mux-h1: Add C-L header in outgoing message if it was removed
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Oct 2023 06:44:05 +0000 (08:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 4 Oct 2023 13:34:18 +0000 (15:34 +0200)
commitc43742c188e123abe2f71f16396cdc2a54dbf880
tree13a57b5e777f8b1f27f3922ba20a58f71f1fe8dc
parentaccd3e911c6952a52aaa79866b6c9d46d9022412
BUG/MEDIUM: mux-h1: Add C-L header in outgoing message if it was removed

If a C-L header was found during parsing of a message but it was removed via
a HTTP action, it is re-added during the message formatting. Indeed, if
headers about the payload are modified, meta-data of the message must also
be updated. Otherwise, it is not possible to guarantee the message will be
properly formatted.

To do so, we rely on the flag H1S_F_HAVE_CLEN.

This patch should not be backported except an issue is explicitly
reported. It relies on "MINOR: mux-h1: Add flags if outgoing msg contains a
header about its payload".
src/mux_h1.c