[BUG] cookie: correctly unset default cookie parameters
When a backend defines a new cookie, it forgot to unset any params
that could have been set in a defaults section, resulting in configs
that would sometimes refuse to load or not work as expected.
(cherry picked from commit f80bf174ed905a29a3ed8ee91fcd528da6df174f)
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 58c5db8..da6ef81 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -1660,11 +1660,13 @@
goto out;
}
+ curproxy->options &= ~PR_O_COOK_ANY;
+ curproxy->cookie_maxidle = curproxy->cookie_maxlife = 0;
free(curproxy->cookie_domain); curproxy->cookie_domain = NULL;
free(curproxy->cookie_name);
curproxy->cookie_name = strdup(args[1]);
curproxy->cookie_len = strlen(curproxy->cookie_name);
-
+
cur_arg = 2;
while (*(args[cur_arg])) {
if (!strcmp(args[cur_arg], "rewrite")) {