BUG/MINOR: http-ana: Set CF_EOI on response channel for generated responses
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jun 2020 13:36:45 +0000 (15:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jun 2020 19:50:20 +0000 (21:50 +0200)
commit1a9db7c0d76b53d82144915ded6733d84d1756fa
treef7f3d46a7a11817cc41672930a0a4ff1143a96a7
parent42b77b0ba64cd2f8b1b90b4ca4ac764c1de9f58c
BUG/MINOR: http-ana: Set CF_EOI on response channel for generated responses

To be consistent with other processings on the channels, when HAProxy generates
a final response, the CF_EOI flag must be set on the response channel. This flag
is used to know that a full message was pushed into the channel (HTX messages
with an EOM block). It is used in conjunction with other channel's flags in
stream-interface functions. Especially when si_cs_send() is called, to know if
we must set or not the CO_SFL_MSG_MORE flag. Without CF_EOI, the CO_SFL_MSG_MORE
flag is always set and the message forwarding is delayed.

This patch may be backported as far as 1.9, for HTX part only. But this part has
changed in the 2.2, so it may be a bit tricky. Note it does not fix any known
bug on previous versions because the CO_SFL_MSG_MORE flag is ignored by the h1
mux.
src/http_ana.c