]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-ana/filters: Wait end of the http_end callback for all filters
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 15:31:46 +0000 (16:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Jan 2020 14:18:45 +0000 (15:18 +0100)
commit1a3e0279c6079174288e2e3fbbf09e530ff221c5
treea17d221d4e7838acd6ff19a27acf78d7e016b580
parentcf403f32e4bd5217064f8831930b45c5fb37131b
BUG/MINOR: http-ana/filters: Wait end of the http_end callback for all filters

Filters may define the "http_end" callback, called at the end of the analysis of
any HTTP messages. It is called at the end of the payload forwarding and it can
interrupt the stream processing. So we must be sure to not remove the XFER_BODY
analyzers while there is still at least filter in progress on this callback.

Unfortunatly, once the request and the response are borh in the DONE or the
TUNNEL mode, we consider the XFER_BODY analyzer has finished its processing on
both sides. So it is possible to prematurely interrupt the execution of the
filters "http_end" callback.

To fix this bug, we switch a message in the ENDING state. It is then switched in
DONE/TUNNEL mode only after the execution of the filters "http_end" callback.

This patch must be backported (and adapted) to 2.1, 2.0 and 1.9. The legacy HTTP
mode shoud probaly be fixed too.
src/http_ana.c