diff --git a/include/types/proto_http.h b/include/types/proto_http.h index 563d02d40..62016da08 100644 --- a/include/types/proto_http.h +++ b/include/types/proto_http.h @@ -252,7 +252,6 @@ enum { HTTP_REQ_ACT_TRK_SC0, /* SC1, SC2, ... SCn */ HTTP_REQ_ACT_TRK_SCMAX = HTTP_REQ_ACT_TRK_SC0 + MAX_SESS_STKCTR - 1, - HTTP_REQ_ACT_MAX /* must always be last */ }; /* actions for "http-response" */ @@ -276,7 +275,6 @@ enum { HTTP_RES_ACT_REDIR, HTTP_RES_ACT_CUSTOM_STOP, /* used for module keywords */ HTTP_RES_ACT_CUSTOM_CONT, /* used for module keywords */ - HTTP_RES_ACT_MAX /* must always be last */ }; /* final results for http-request rules */ diff --git a/src/proto_http.c b/src/proto_http.c index 6571fdaef..0d8f50cf9 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3432,8 +3432,6 @@ http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct stream s->current_rule_list = rules; list_for_each_entry(rule, rules, list) { - if (rule->action >= HTTP_REQ_ACT_MAX) - continue; /* check optional condition */ if (rule->cond) { @@ -3694,6 +3692,10 @@ resume_execution: } } break; + + /* other flags exists, but normaly, they never be matched. */ + default: + break; } } @@ -3735,8 +3737,6 @@ http_res_get_intercept_rule(struct proxy *px, struct list *rules, struct stream s->current_rule_list = rules; list_for_each_entry(rule, rules, list) { - if (rule->action >= HTTP_RES_ACT_MAX) - continue; /* check optional condition */ if (rule->cond) { @@ -3918,6 +3918,10 @@ resume_execution: case HTTP_RES_ACT_CUSTOM_STOP: rule->action_ptr(rule, px, s->sess, s); return HTTP_RULE_RES_STOP; + + /* other flags exists, but normaly, they never be matched. */ + default: + break; } }