]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: channel/htx: Don't alter channel during forward for empty HTX message
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 29 May 2019 12:52:56 +0000 (14:52 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Jun 2019 08:12:11 +0000 (10:12 +0200)
commita4f9dd4a56420f547c1fa1bd6ff3e88735671ab6
tree44ba1614e3e34fcc09c7ba53106186a13ab34016
parent65674662b4b950c7f5fb7572859b98ef8c9a8767
BUG/MINOR: channel/htx: Don't alter channel during forward for empty HTX message

In channel_htx_forward() and channel_htx_forward_forever(), if the HTX message
is empty, the underlying buffer may be really empty too. And we have no warranty
the caller will call htx_to_buf() later. And in practice, it is almost never
done. So the channel's buffer must not be altered. Otherwise, the buffer may be
considered as full (data == size) for an empty HTX message and no outgoing data.

This patch must be backported to 1.9.
include/proto/channel.h