]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: h3: properly realloc buffer after interim response encoding
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Jul 2025 08:59:07 +0000 (10:59 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Jul 2025 16:39:23 +0000 (18:39 +0200)
commitd59bdfb8ec5b5af284672af8a89bf0d1662d8efd
tree53b97327699d7bbe54bd66ed914a93999e6f8eef
parent1290fb731d9bb84777d811b69cf71106b89f92cf
BUG/MINOR: h3: properly realloc buffer after interim response encoding

Previous commit fixes encoding of several following HTTP response
message when interim status codes are first reported. However,
h3_resp_headers_send() still was unable to interrupt encoding if output
buffer room was not sufficient. This case may be likely because small
buffers are used for headers encoding.

This commit fixes this situation. If output buffer is not empty prior to
response encoding, this means that a previous interim response message
was already encoded before. In this case, and if remaining space is not
sufficient, use buffer release mechanism : this allows to restart
response encoding by using a newer buffer. This process has already been
used for DATA and trailers encoding.

This must be backported up to 2.6. However, note that buffer release
mechanism is not present for version 2.8 and lower. In this case, qcs
flag QC_SF_BLK_MROOM should be enough as a replacement.
src/h3.c