]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-h1: Fix condition to send null-chunk for bodyless message
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Apr 2026 14:40:55 +0000 (16:40 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Apr 2026 08:21:53 +0000 (10:21 +0200)
commit392abee6d4fc6e86488829ea40ad8dbbbb35ba71
tree2eb1ced287fedb876d8e619a3122aefcbc83b780
parent16485cdebed6bc2061289bb3a28dff32ec7d65a6
BUG/MINOR: mux-h1: Fix condition to send null-chunk for bodyless message

When the EOH block is processed, before sending message headers, there is a
test to know if there is no payload. In case of a chunked message, a
null-chunk is emitted, except for bodyless response. For instance, a
response to a HEAD request has no payload at all and no null-chunk.

However, the test for bodyless responses is not correct. Only
H1S_F_BODYLESS_RESP flag is tested. But this flag can be set on server side
when we are processing the request. To fix the issue, the test was
adapted. The null-chunk is added if a message with no payload is chunked and
it is a request or a non-bodyless responses.

This patch must be backported to all stable version.
src/mux_h1.c