BUG/MEDIUM: mux-fcgi: Handle cases where the HTX EOM block cannot be inserted
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Dec 2019 15:20:49 +0000 (16:20 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 9 Dec 2019 09:43:19 +0000 (10:43 +0100)
commit5829fe014eeb56b5cf54fb11b59ff51020e2a380
tree7cb8d19107ad09c6edade403d970325fcfc5591b
parent6f6886e021828a24295271bd83b33a9917d70323
BUG/MEDIUM: mux-fcgi: Handle cases where the HTX EOM block cannot be inserted

During the HTTP response parsing, if there is not enough space in the channel's
buffer, it is possible to fail to add the HTX EOM block while all data in the
rxbuf were consumed. As for the h1 mux, we must notify the conn-stream the
buffer is full to have a chance to add the HTX EOM block later. In this case, we
must also be carefull to not report a server abort by setting too early the
CS_FL_EOS flag on the conn-stream.

To do so, the FCGI_SF_APPEND_EOM flag must be set on the FCGI stream to know the
HTX EOM block is missing.

This patch must be backported to 2.1.

(cherry picked from commit f950c2e97e999f2d4728389dbab2d0955a5cc993)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/mux_fcgi.c