BUG/MEDIUM: stream-int: Don't block SI on a channel policy if EOI is reached
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Sep 2021 08:17:59 +0000 (10:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Sep 2021 14:46:16 +0000 (16:46 +0200)
commit3dae79e59dc34c6e645daa31929410dfa02f01c0
tree4984bf8b2ac19b45f05250cacd6914a6619db204
parent4977f1d8d0bf50fde5938ca4fa205ef76b10476b
BUG/MEDIUM: stream-int: Don't block SI on a channel policy if EOI is reached

If the end of input is reported by the mux on the conn-stream during a
receive, we leave without evaluating the channel policies. It is especially
important to be able to catch client aborts during server connection
establishment. Indeed, in this case, without this patch, the
stream-interface remains blocked and read events are not forwarded to the
stream. It means it is not possible to detect client aborts.

Thanks to this fix, the abortonclose option should fixed for HAProxy 2.3 and
lower. On 2.4 and 2.5, it seems to work because the stream is created after
the request parsing.

Note that a previous fix of abortonclose option was reverted. This one
should be the right way to fix it. It must carefully be backported as far as
2.0. A observation period on the 2.3 is probably a good idea.

(cherry picked from commit 883d83e83c54c77cd16735716a029670b6317926)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 82219b562b512bda3b71489577a23f0c92ea875f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stream_interface.c