]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: htx: count the amount of copied data towards the final count
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Feb 2019 14:06:30 +0000 (15:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Feb 2019 16:13:07 +0000 (17:13 +0100)
commit2bf0c13261924d06317556ed603fb32e41a2d2c5
treed3da92c2d559776a30c3409e86df6b528e6436a5
parenteaf0d2a9367c418745b788a1b9a3ee8b85157b7a
BUG/MEDIUM: htx: count the amount of copied data towards the final count

Currently htx_xfer_blks() respects the <count> limit for each block
instead of for the sum of the transfered blocks. This causes it to
return slightly more than requested when both headers and data are
present in the source buffer, which happens early in the transfer
when the reserve is still active. Thus with large enough headers,
the reserve will not be respected.

Note that this function is only called from h2_rcv_buf() thus this only
affects data entering over H2 (H2 requests or H2 responses).

This fix must be backported to 1.9.
src/htx.c