Skip to content

Commit

Permalink
BUG/MINOR: http-ana: Report internal error if an action yields on a f…
Browse files Browse the repository at this point in the history
…inal eval

This was already performed for tcp actions at content level, but not for
HTTP actions. It is always a bug, so it must be reported accordingly.

This patch may be backported to all stable versions.

(cherry picked from commit 65ea29d)
Signed-off-by: Christopher Faulet <[email protected]>
(cherry picked from commit 14abd18)
Signed-off-by: Christopher Faulet <[email protected]>
(cherry picked from commit 097a676)
Signed-off-by: Christopher Faulet <[email protected]>
  • Loading branch information
capflam committed Nov 6, 2024
1 parent 98e674d commit d453a56
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/http_ana.c
Original file line number Diff line number Diff line change
Expand Up @@ -2701,6 +2701,13 @@ static enum rule_result http_req_get_intercept_rule(struct proxy *px, struct lis
goto end;
case ACT_RET_YIELD:
s->current_rule = rule;
if (act_opts & ACT_OPT_FINAL) {
send_log(s->be, LOG_WARNING,
"Internal error: action yields while it is no long allowed "
"for the http-request actions.");
rule_ret = HTTP_RULE_RES_ERROR;
goto end;
}
rule_ret = HTTP_RULE_RES_YIELD;
goto end;
case ACT_RET_ERR:
Expand Down Expand Up @@ -2864,6 +2871,13 @@ static enum rule_result http_res_get_intercept_rule(struct proxy *px, struct lis
goto end;
case ACT_RET_YIELD:
s->current_rule = rule;
if (act_opts & ACT_OPT_FINAL) {
send_log(s->be, LOG_WARNING,
"Internal error: action yields while it is no long allowed "
"for the http-response/http-after-response actions.");
rule_ret = HTTP_RULE_RES_ERROR;
goto end;
}
rule_ret = HTTP_RULE_RES_YIELD;
goto end;
case ACT_RET_ERR:
Expand Down

0 comments on commit d453a56

Please sign in to comment.