]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] config: make it possible to specify a cookie even without a server
authorWilly Tarreau <w@1wt.eu>
Mon, 30 May 2011 16:47:41 +0000 (18:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 May 2011 04:44:04 +0000 (06:44 +0200)
Since version 1.0.0, it's forbidden to have a cookie specified without at
least one server. This test is useless and makes it complex to write APIs
to iteratively generate working configurations. Remove the test.

src/cfgparse.c

index dedd5c783b2b5fb1e30c0ee32af07a2790305dbb..9063854bb706e001925e64c9f4b8fde0044a0868 100644 (file)
@@ -5584,11 +5584,6 @@ int check_config_validity()
 
                case PR_MODE_HTTP:
                        curproxy->acl_requires |= ACL_USE_L7_ANY;
-                       if ((curproxy->cookie_name != NULL) && (curproxy->srv == NULL)) {
-                               Alert("config : HTTP proxy %s has a cookie but no server list !\n",
-                                     curproxy->id);
-                               cfgerr++;
-                       }
                        break;
                }