]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] config: the "capture" keyword is not allowed in backends
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jul 2009 11:24:23 +0000 (13:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 26 Jul 2009 15:40:57 +0000 (17:40 +0200)
The "capture" keyword is only supported by frontends, fix the check.
(cherry picked from commit 3b6b1a984d6a587892afc88d03862c3fc3681bce)

src/cfgparse.c

index 2ab51ec302bd0e9664914b74ea6447c5c8887391..8227a892b16761ef4be38fd00ee395012186be83 100644 (file)
@@ -877,7 +877,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
                        curproxy->iface_len  = defproxy.iface_len;
                }
 
-               if (curproxy->cap & PR_CAP_RS) {
+               if (curproxy->cap & PR_CAP_FE) {
                        if (defproxy.capture_name)
                                curproxy->capture_name = strdup(defproxy.capture_name);
                        curproxy->capture_namelen = defproxy.capture_namelen;
@@ -1288,7 +1288,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
                }
        } /* Url App Session */
        else if (!strcmp(args[0], "capture")) {
-               if (warnifnotcap(curproxy, PR_CAP_RS, file, linenum, args[0], NULL))
+               if (warnifnotcap(curproxy, PR_CAP_FE, file, linenum, args[0], NULL))
                        err_code |= ERR_WARN;
 
                if (!strcmp(args[1], "cookie")) {  /* name of a cookie to capture */