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.
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:
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: