From: Christopher Faulet Date: Tue, 5 May 2020 05:59:23 +0000 (+0200) Subject: BUG/MINOR: checks: Support multiple HTTP expect rules X-Git-Tag: v2.2-dev7~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a200d6bd5b6523fc7ff7424cc3b369db0495546;p=thirdparty%2Fhaproxy.git BUG/MINOR: checks: Support multiple HTTP expect rules For an http-check ruleset, it should be allowed to set a chain of expect rules. But an error is triggered during the post-parsing because of a wrong test, inherited from the evaluation mode before the refactoring. No need to backport. --- diff --git a/src/checks.c b/src/checks.c index b7d365b5b1..8d371e652d 100644 --- a/src/checks.c +++ b/src/checks.c @@ -4497,7 +4497,7 @@ static int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_rul chk->index+1); return 0; } - else if (r->action != TCPCHK_ACT_SEND && chk->action == TCPCHK_ACT_EXPECT) { + else if (r->action != TCPCHK_ACT_SEND && r->action != TCPCHK_ACT_EXPECT && chk->action == TCPCHK_ACT_EXPECT) { memprintf(errmsg, "unable to add http-check expect rule at step %d (missing send rule).", chk->index+1); return 0;