BUG/MINOR: mux-h1: Don't set CS_FL_EOI too early for protocol upgrade requests
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Dec 2020 17:21:27 +0000 (18:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Jan 2021 12:59:53 +0000 (13:59 +0100)
commitfe2d5b11f4aec0c8effd4ec4a2c9c1f07a9dc919
tree154d2e6f5fb29ee46d1d1bcfe736413bf7773467
parentf25b487b1f4b9acb14010293f1e85cbb911caab7
BUG/MINOR: mux-h1: Don't set CS_FL_EOI too early for protocol upgrade requests

When a protocol upgrade request is received, once parsed, it is waiting for
the response in the DONE state. But we must not set the flag CS_FL_EOI
because we don't know if a protocol upgrade will be performed or not.

Now, it is set on the response path, if both sides reached the DONE
state. If a protocol upgrade is finally performed, both side are switched in
TUNNEL state. Thus the CS_FL_EOI flag is not set.

If backported, this patch must be adapted because for now it relies on last
2.4-dev changes. It may be backported as far as 2.0.

(cherry picked from commit 3e1748bbf30bc06407bda36517c00c0b97bfeb50)
[cf: context adjustment]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/mux_h1.c