]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: htx: only rollback blocks copied by the current call in htx_xfer()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 3 Dec 2026 17:05:26 +0000 (18:05 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Dec 2026 13:54:03 +0000 (14:54 +0100)
commitbd69dcf068fd2fe384d74efbf43f640cc697ffcf
treea268d596c3ec06324bedc49cd7992c2c0dae5451
parent4c8c97e68823739443241974fbb5da402937523a
BUG/MINOR: htx: only rollback blocks copied by the current call in htx_xfer()

When partial copies of headers or trailers are not allowed, htx_xfer()
removes the start-line, header and trailer blocks found at the end of
<dst> when the copy is interrupted, and rolls back on <src> accordingly.
But this was not limited to the blocks copied by the current call. If
<dst> already ended with such blocks, for instance a trailer block added
by the cache applet, these blocks were removed too, and the rollback on
<src> went beyond its first block. In this case, <src> was then fully
drained.

Now, the start-line, header and trailer blocks copied at the end of
<dst> are counted, and only these blocks are removed on rollback.

This patch must be backported to 3.4.
src/htx.c