BUG/MINOR: http-ana: Reset HTX first index when HAPRoxy sends a response
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Jan 2020 18:12:35 +0000 (19:12 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2020 13:55:34 +0000 (14:55 +0100)
commit7a138dc9082c0e144b81cd3113e14695c16d05c6
tree843a29df8b372a37ed9c38298b8974bd80171768
parent3b2bb63ded00fea8525b3fc29e6bb30671b272c7
BUG/MINOR: http-ana: Reset HTX first index when HAPRoxy sends a response

The first index in an HTX message is the HTX block index from which the HTTP
analysis must be performed. When HAProxy sends an HTTP response, on error or
redirect, this index must be reset because all pending incoming data are
considered as forwarded. For now, it is only a bug for 103-Early-Hints
response. For other responses, it is not a problem. But it will be when the new
ruleset applied on all responses will be added. For 103 responses, if the first
index is not reset, if there are rewritting rules on server responses, the
generated 103 responses, if any, are evaluated too.

This patch must be backported and probably adapted, at least for 103 responses,
as far as 1.9.
src/http_act.c
src/http_ana.c