mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 00:27:08 +02:00
[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)
This commit is contained in:
parent
bfcd31134b
commit
c63d4bbff9
@ -1660,11 +1660,13 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
|||||||
goto out;
|
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_domain); curproxy->cookie_domain = NULL;
|
||||||
free(curproxy->cookie_name);
|
free(curproxy->cookie_name);
|
||||||
curproxy->cookie_name = strdup(args[1]);
|
curproxy->cookie_name = strdup(args[1]);
|
||||||
curproxy->cookie_len = strlen(curproxy->cookie_name);
|
curproxy->cookie_len = strlen(curproxy->cookie_name);
|
||||||
|
|
||||||
cur_arg = 2;
|
cur_arg = 2;
|
||||||
while (*(args[cur_arg])) {
|
while (*(args[cur_arg])) {
|
||||||
if (!strcmp(args[cur_arg], "rewrite")) {
|
if (!strcmp(args[cur_arg], "rewrite")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user