]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] config: warn if response-only conditions are used in "redirect" rules
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2011 14:24:42 +0000 (15:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2011 14:32:21 +0000 (15:32 +0100)
src/cfgparse.c

index c588b466e937bc625c1bf4ca2250d5bd97dd88c5..aae2efeda193273f17d61115799a818e97ef918b 100644 (file)
@@ -2644,7 +2644,8 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                rule->flags = flags;
                LIST_INIT(&rule->list);
                LIST_ADDQ(&curproxy->redirect_rules, &rule->list);
-               warnif_rule_after_use_backend(curproxy, file, linenum, args[0]);
+               err_code |= warnif_rule_after_use_backend(curproxy, file, linenum, args[0]);
+               err_code |= warnif_cond_requires_resp(cond, file, linenum);
        }
        else if (!strcmp(args[0], "use_backend")) {
                struct switching_rule *rule;