BUG/MEDIUM: http-ana: Don't wait to have an empty buf to switch in TUNNEL state

When we want to establish a tunnel on a side, we wait to have flush all data
from the buffer. At this stage the other side is at least in DONE state. But
there is no real reason to wait. We are already in DONE state on its
side. So all the HTTP message was already forwarded or planned to be
forwarded. Depending on the scheduling if the mux already started to
transfer tunneled data, these data may block the switch in TUNNEL state and
thus block these data infinitly.

This bug exists since the early days of HTX. May it was mandatory but today
it seems useless. But I honestly don't remember why this prerequisite was
added. So be careful during the backports.

This patch should be backported with caution. At least as far as 2.4. For
2.2 and 2.0, it seems to be mandatory too. But a review must be performed.

(cherry picked from commit 52fc0cbaadf01a91b18465034b58c32188f7606a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 7f34a2c5f66115bf86a03ad24ee47b8240bb4f9a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f1d7ed687ecae3f3effe37a182132669878f6e4f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed