BUG/MEDIUM: http-ana: Reset channels analysers when returning an error
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 10 Sep 2021 07:17:50 +0000 (09:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Sep 2021 14:39:52 +0000 (16:39 +0200)
commit376b574162b85fe1651c7bc96498b1caea0f19ef
tree1e65f9fd166a2454198b92aa918fcfab8854d604
parentcc9876220b6be3fa103146687148590cb47e254e
BUG/MEDIUM: http-ana: Reset channels analysers when returning an error

When an error is returned to the client, via a call to
http_reply_and_close(), the request channel is flushed and shut down and
HTTP analysis on both direction is finished. So it is safer to centralize
reset of channels analysers at this place. It is especially important when a
filter is attached to the stream when a client abort is detected. Because,
otherwise, the stream remains blocked because request analysers are not
reset.

This bug was hidden for a while. But since the fix 6fcd2d328 ("BUG/MINOR:
stream: Don't release a stream if FLT_END is still registered"), it is
possible to trigger it.

This patch must be backported everywhere the above commit was backported.

(cherry picked from commit 2d56500826d54fca445de2c0170384763b1cfdb1)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit db8ba1069af969f0ad344c8c9d1be0a650ca3005)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_ana.c