BUG/MEDIUM: mux-fcgi: Properly handle EOM flag on end-of-trailers HTX block

Trailers are skipped by the FCGI multiplexer. However empty chunked messages
are not properly handled. It may be a chunked H1 request with no payload or
a H2/H3 POST request with no payload. In that caes, the EOT HTX block is
just ignored. The issue is that the EOM flag is thus ignored too. It means
no empty STDIN record is sent to mark the end of the request to the server.

To fix the issue, when a EOT htx block is found and it is the last HTX block
of the message (and it should be), the EOM flag is tested. If it is found,
an empty STDIN record is emitted.

This patch should fix the issue #2499. It must be backported as far as 2.4.

(cherry picked from commit 56c4b29ff1e7df05201fa736aa3f35307443f73b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0c573a52b4c89f01fdf8ebb785fb67c53e4e3300)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 2b85a649c7d15d285075ecae703b97df81226209)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 38f87f7bf2d26b981b277ad1fd5d89b3a61fa295)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f48bb1a8a5efe3aeca241a45ae93a73b5a3e0052)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed