]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Don't request more room on partial trailers
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Apr 2022 15:48:54 +0000 (17:48 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 14 Apr 2022 09:57:06 +0000 (11:57 +0200)
commitae660be547eb72b5c213d87769e60c527fe6b7cd
treeff47683d8cc2b95977f528863eddc9fe0dc46e54
parentcea05437c0c831c3fc0309dccc6071c249c9c8d7
BUG/MEDIUM: mux-h1: Don't request more room on partial trailers

The commit 744451c7c ("BUG/MEDIUM: mux-h1: Properly detect full buffer cases
during message parsing") introduced a regression if trailers are not
received in one time. Indeed, in this case, nothing is appended in the
channel buffer, while there are some data in the input buffer. In this case,
we must not request more room to the upper layer, especially because the
channel buffer can be empty.

To fix the issue, on trailers parsing, we consider the H1 stream as
congested when the max size allowed is reached. Of course, the H1 stream is
also considered as congested if the trailers are too big and the channel
buffer is not empty.

This patch should fix the issue #1657. It must be backported as far as 2.0.
src/h1_htx.c
src/mux_h1.c