mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-17 06:41:00 +01:00
MINOR: http-rules: Return an error when custom actions return ACT_RET_ERR
Thanks to the commit "MINOR: actions: Use ACT_RET_CONT code to ignore an error from a custom action", it is now possible to trigger an error from a custom action in http rules. Now, when a custom action returns the ACT_RET_ERR code from an http-request rule, an error 400 is returned. And from an http-response rule, an error 502 is returned. Be careful if this patch is backported. The other mentioned patch must be backported first.
This commit is contained in:
parent
491ab5e2e5
commit
28160e73dd
@ -3100,6 +3100,8 @@ static enum rule_result http_req_get_intercept_rule(struct proxy *px, struct lis
|
||||
|
||||
switch (rule->action_ptr(rule, px, s->sess, s, act_flags)) {
|
||||
case ACT_RET_ERR:
|
||||
rule_ret = HTTP_RULE_RES_BADREQ;
|
||||
goto end;
|
||||
case ACT_RET_CONT:
|
||||
break;
|
||||
case ACT_RET_STOP:
|
||||
@ -3493,6 +3495,8 @@ resume_execution:
|
||||
|
||||
switch (rule->action_ptr(rule, px, s->sess, s, act_flags)) {
|
||||
case ACT_RET_ERR:
|
||||
rule_ret = HTTP_RULE_RES_BADREQ;
|
||||
goto end;
|
||||
case ACT_RET_CONT:
|
||||
break;
|
||||
case ACT_RET_STOP:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user