]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux-h1: don't lose error responses once a content-length was parsed
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 14:04:50 +0000 (16:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2026 17:10:27 +0000 (19:10 +0200)
commitfb53e904b836f51148e85244878069ef2acc44da
tree51d46cc20ee6027cc83ca996af87ec9ea3beafb6
parent60ad05efa270b95078a52b7ffa2fd9d549835de4
BUG/MEDIUM: mux-h1: don't lose error responses once a content-length was parsed

When a request is rejected before its stream is created, an error should be
send by the H1 mux and the embryonic H1 stream is destroyed. But if a
non-null content-length was already parsed, the request was considered as
truncated, discarding the error sending and closing the connection. The
error was logged but not sent.

The regression was introduced by the commit commit 75dd2c18d ("BUG/MEDIUM:
mux-h1: close the connection on a short content-length").

To fix the issue, before destroying an embryonic H1 stream, the current
request and response lengths are reset.

This must be backported wherever commit 75dd2c18d was backported, so as far
as 2.8.
reg-tests/http-messaging/h1_error_after_content_length.vtc [new file with mode: 0644]
src/mux_h1.c