]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: proto_htx: Use HTX versions to truncate or erase a buffer
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Jan 2019 13:57:35 +0000 (14:57 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Jan 2019 11:06:55 +0000 (12:06 +0100)
commit202c6ce1a27c92d21995ee82c71b2f70c636e3ea
tree55306b7143bd6328cfb52edfd577516345183598
parentf7ed195ac8b2b7bbae2ca2b2706f7ba11fa63919
BUG/MINOR: proto_htx: Use HTX versions to truncate or erase a buffer

channel_truncate() is not aware of the underlying format of the messages. So if
there are some outgoing data in the channel when called, it does some unexpected
operations on the channel's buffer. So the HTX version, channel_htx_truncate(),
must be used. The same is true for channel_erase(). It resets the buffer but not
the HTX message. So channel_htx_erase() must be used instead. This patch is
flagged as a bug, but as far as we know, it was never hitted.

This patch should be backported to 1.9. If so, following patch must be
backported too:

  * MINOR: channel/htx: Add the HTX version of channel_truncate/erase
src/proto_htx.c