]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: htx: Don't crush blocks payload when append is done on a data block
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Apr 2019 12:54:46 +0000 (14:54 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 20:06:45 +0000 (22:06 +0200)
commitf1449b785e02b8563f2e398c75a5be36379ca8b6
tree94c076d92c08b1c55879d4fe2133b8858a618144
parent05aab64b06ebf884584150c938f49be22eed6255
BUG/MEDIUM: htx: Don't crush blocks payload when append is done on a data block

If there is a data block when a header block is added in a HTX message, its
payload will be inserted after the data block payload. But its index will be
moved before the EOH block. So at this stage, if a new data block is added, we
will try to append its payload to the last data block (because it is also the
tail). Thus the payload of the further header block will be crushed.

This cannot happens if the payloads wrap thanks to the previous fix. But it
happens when the tail is not the front too. So now, in this case, we add a new
block instead of appending.

This patch must be backported in 1.9.
src/htx.c