mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-09 00:32:33 -04:00
BUG/MINOR: http-act: Properly handle final evaluation in pause action
The ACT_OPT_FINAL flag was not properly handled in the pause action. When this flag is set, because of an abort or an unexpected error, an action must no longer yield. However, in the pause action, this flag was never tested. In case of client abort for instance, this could trigger an internal error instead of a client error. This patch should fix the issue #3403. It must be backported as far as 3.2.
This commit is contained in:
parent
1c9e4b0d18
commit
cb161bfeb7
1 changed files with 4 additions and 0 deletions
|
|
@ -2082,6 +2082,9 @@ static enum act_return http_action_pause(struct act_rule *rule, struct proxy *px
|
|||
struct channel *chn = ((rule->from == ACT_F_HTTP_REQ) ? &s->req : &s->res);
|
||||
struct sample *key;
|
||||
|
||||
if (flags & ACT_OPT_FINAL)
|
||||
goto end;
|
||||
|
||||
if (!tick_isset(chn->analyse_exp)) {
|
||||
int time;
|
||||
|
||||
|
|
@ -2099,6 +2102,7 @@ static enum act_return http_action_pause(struct act_rule *rule, struct proxy *px
|
|||
if (tick_isset(chn->analyse_exp) && !tick_is_expired(chn->analyse_exp, now_ms))
|
||||
return ACT_RET_YIELD;
|
||||
|
||||
end:
|
||||
chn->analyse_exp = TICK_ETERNITY;
|
||||
return ACT_RET_CONT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue