]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: properly account for the appended data in HTX
authorWilly Tarreau <w@1wt.eu>
Sat, 15 Jun 2019 09:34:41 +0000 (11:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 15 Jun 2019 09:42:01 +0000 (11:42 +0200)
commitb6563f4ac407a6096a2b2d5126729c2668dc0493
tree94dfbf05e0dd88e22096d7f7a5d9913900cd686d
parent8694e5bc99e8c8de8056f026b1f509be348b0bc0
BUG/MEDIUM: mux-h2: properly account for the appended data in HTX

When commit 0350b90e3 ("MEDIUM: htx: make htx_add_data() never defragment
the buffer") was introduced, it made htx_add_data() actually be able to
add less data than it was asked for, and the callers must use the returned
value to know how much was added. The H2 code used to rely on the frame
length instead of the return value. A version of the code doing this was
written but is obviously not the one that got merged, resulting in breaking
large uploads or downloads when HTX would have instead defragmented the
buffer because the HTX side sees less contents than what the H2 side sees.

This patch fixes this again. No backport is needed.
src/mux_h2.c