diff --git a/src/checks.c b/src/checks.c index b59c6b7e9..bb78cc845 100644 --- a/src/checks.c +++ b/src/checks.c @@ -2296,8 +2296,16 @@ static enum tcpcheck_eval_ret tcpcheck_eval_expect_http(struct check *check, str if (!http_match_header(htx, expect->hdr.name_re, &ctx, full)) goto end_of_match; break; + default: + /* should never happen */ + goto end_of_match; } + /* A header has matched the name pattern, let's test its + * value now (always defined from there). If there is no + * value pattern, it is a good match. + */ + if (expect->flags & TCPCHK_EXPT_FL_HTTP_HVAL_NONE) { match = 1; goto end_of_match;