BUG/MEDIUM: fcgi-app: Use http_msg flags to know if C-L header can be added

Instead of relying on the HTX start-line flags, it is better to rely on
http_msg flags to know if a content-length header can be added or not. In
addition, if the header is added, HTTP_MSGF_CNT_LEN flag must be added.

Because of this bug, an invalid message can be emitted when the response is
compressed because it may contain C-L and a T-E headers.

This patch should fix the issue #1660. It must be backported as far as 2.2.

(cherry picked from commit 32af9a78303cc798eaf1dc506552862cc197e561)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 4bf907d961369102b1829aab40f67ee0123ea98e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed