]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-act: Properly generate 103 responses when several rules are used
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 Jul 2022 14:24:15 +0000 (16:24 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Jul 2022 07:37:43 +0000 (09:37 +0200)
commit4c3d3d2a685bb4f33c7dae44a6f56fcce1689dcf
tree8e59fd98ab9c8b62ea1688e222205b409a95ecdb
parent4c8e58def6042081af4a721db8d53ca91b335a38
BUG/MINOR: http-act: Properly generate 103 responses when several rules are used

When several "early-hint" rules are used, we try, as far as possible, to
merge links into the same 103-early-hints response. However, it only works
if there is no ACLs. If a "early-hint" rule is not executed an invalid
response is generated. the EOH block or the start-line may be missing,
depending on the rule order.

To fix the bug, we use the transaction status code. It is unused at this
stage. Thus, it is set to 103 when a 103-early-hints response is in
progress. And it is reset when the response is forwarded. In addition, the
response is forwarded if the next rule is an "early-hint" rule with an
ACL. This way, the response is always valid.

This patch must be backported as far as 2.2.
src/http_act.c