]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux-h1: Don't decrement .curr_len for unsent data
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jan 2022 16:27:51 +0000 (17:27 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 11 Jan 2022 08:15:13 +0000 (09:15 +0100)
commitb4eca0e9087762ba7b8c36690001792ac454b7ea
treed9a73177baa91fdd557edf8e296292a362b692a5
parenta996763619de2d3e5883b9e097948a2290279d26
BUG/MAJOR: mux-h1: Don't decrement .curr_len for unsent data

A regression was introduced by commit 140f1a58 ("BUG/MEDIUM: mux-h1: Fix
splicing by properly detecting end of message"). To detect end of the
outgoing message, when the content-length is announced, we count amount of
data already sent. But only data really sent must be counted.

If the output buffer is full, we can fail to send data (fully or
partially). In this case, we must take care to only count sent
data. Otherwise we may think too much data were sent and an internal error
may be erroneously reported.

This patch should fix issues #1510 and #1511. It must be backported as far
as 2.4.
src/mux_h1.c