]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: htx: fix random premature abort of data transfers
authorWilly Tarreau <w@1wt.eu>
Tue, 9 Apr 2019 14:21:54 +0000 (16:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Apr 2019 14:30:20 +0000 (16:30 +0200)
commit90caa07935651b5b9ece3606d19ba5d7d45c46e8
tree9fb05fed6f6e945be3ee4b83000b31fe51b23a0a
parent3ca18bf0bd45a86f35b9367fde301fa5d9e48731
BUG/MEDIUM: htx: fix random premature abort of data transfers

It can happen in some cases that the last block of an H2 transfer over
HTX is truncated. This was tracked down to a leftover of an earlier
implementation of htx_xfer_blks() causing the computed size of a block
to be incorrectly calculated if a data block doesn't completely fit into
the target buffer. In practice it causes the EOM block to be attempted to
be emitted with a wrong size and the message to be truncated. One way to
reproduce this is to chain two haproxy instances in h1->h2->h1 with
httpterm as the server and h2load as the client, making many requests
between 8 and 10kB over a single connection. Usually one of the very
first requests will fail.

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