]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] buffer_replace2 must never change the ->w entry
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Jan 2010 00:49:57 +0000 (01:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Jan 2010 00:53:38 +0000 (01:53 +0100)
commitbbfa7938bd74adbfa435f26503fc10f5938195a3
treecb39f524a4e3566dfcfc3e9dd974b4cdbf9ea951
parent2a6d88dafe5e5628abb962caf395143d0c0b6024
[BUG] buffer_replace2 must never change the ->w entry

This function is used to move data which is located between ->w and ->r,
so it must not touch ->w, otherwise it will displace pending data which
is before the one we're actually overwriting. The issue arises with
some pipelined responses which cause some part of the previous one to
be chopped off when removing the connection: close header, thus
corrupting last response and shifting next one. Those are detected
in the logs because the next response will be a 502 with flags PH.
src/buffers.c