diff --git a/src/proto_http.c b/src/proto_http.c index 7dd0daf9dd..f2152d6c15 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -12049,6 +12049,9 @@ enum act_return http_action_req_capture_by_id(struct act_rule *rule, struct prox */ int check_http_req_capture(struct act_rule *rule, struct proxy *px, char **err) { + if (rule->action_ptr != http_action_req_capture_by_id) + return 1; + if (rule->arg.capid.idx >= px->nb_req_cap) { memprintf(err, "unable to find capture id '%d' referenced by http-request capture rule", rule->arg.capid.idx); @@ -12235,6 +12238,9 @@ enum act_return http_action_res_capture_by_id(struct act_rule *rule, struct prox */ int check_http_res_capture(struct act_rule *rule, struct proxy *px, char **err) { + if (rule->action_ptr != http_action_res_capture_by_id) + return 1; + if (rule->arg.capid.idx >= px->nb_rsp_cap) { memprintf(err, "unable to find capture id '%d' referenced by http-response capture rule", rule->arg.capid.idx);