BUG/MINOR: http-ana: Properly catch aborts during the payload forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 10:29:40 +0000 (11:29 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 Nov 2019 13:11:47 +0000 (14:11 +0100)
commit145719a722def08c079589bf132160ac50911f9f
treed8a2251e9b515b9beb80569bb41c51a223f8ed59
parentf3158e94ee3a2577bb3b075202c9a6616a50bf92
BUG/MINOR: http-ana: Properly catch aborts during the payload forwarding

When no data filter are registered on a channel, if the message length is known,
the HTTP payload is infinitely forwarded to save calls to process_stream(). When
we finally fall back again in XFER_BODY analyzers, we detect the end of the
message by checking channel flags. If CF_EOI or CF_SHUTR is set, we switch the
message in DONE state. For CF_EOI, it is relevant. But not for CF_SHUTR. a
shutdown for reads without the end of input must be interpreted as an abort for
messages with a known length.

Because of this bug, some aborts are not properly handled and reported. Instead,
we interpret it as a legitimate shutdown.

This patch must be backported to 2.0.
src/http_ana.c