BUG/MINOR: mux-h2: Don't encroach on the reserve when decoding headers
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 26 Apr 2021 15:46:13 +0000 (17:46 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 28 Apr 2021 08:51:08 +0000 (10:51 +0200)
commit3d87558f3589c97c809c0c74be7c9fd08293db86
tree475e8d1b7c8fb90280eb9652da1f04fe4ee55c4e
parent2b78f0bfc4b78a57b6dd05f46a4a5f9a69959238
BUG/MINOR: mux-h2: Don't encroach on the reserve when decoding headers

Since the input buffer is transferred to the stream when it is created,
there is no longer control on the request size to be sure the buffer's
reserve is still respected. It was automatically performed in h2_rcv_buf()
because the caller took care to provide the correct available space in the
buffer. The control is still there but it is no longer applied on the
request headers. Now, we should take care of the reserve when the headers
are decoded, before the stream creation.

The test is performed for the request and the response.

It is a 2.4-specific bug. No backport is needed.
src/mux_h2.c