[BUG/CLEANUP] cookiedomain -> cookie_domain rename + free(p->cookie_domain)
Rename cookiedomain -> cookie_domain to be consistent with current naming scheme. Also make sure cookie_domain is deallocated at deinit()
This commit is contained in:
parent
8a7af60312
commit
1acf217366
@ -161,7 +161,7 @@ struct proxy {
|
||||
void (*server_drop_conn)(struct server *);/* to be called when connection is dropped */
|
||||
} lbprm; /* LB parameters for all algorithms */
|
||||
|
||||
char *cookiedomain; /* domain used to insert the cookie */
|
||||
char *cookie_domain; /* domain used to insert the cookie */
|
||||
char *cookie_name; /* name of the cookie to look for */
|
||||
int cookie_len; /* strlen(cookie_name), computed only once */
|
||||
char *url_param_name; /* name of the URL parameter used for hashing */
|
||||
|
@ -917,7 +917,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
curproxy->cookiedomain = strdup(args[cur_arg + 1]);
|
||||
curproxy->cookie_domain = strdup(args[cur_arg + 1]);
|
||||
cur_arg++;
|
||||
}
|
||||
else {
|
||||
|
@ -658,6 +658,9 @@ void deinit(void)
|
||||
if (p->cookie_name)
|
||||
free(p->cookie_name);
|
||||
|
||||
if (p->cookie_domain)
|
||||
free(p->cookie_domain);
|
||||
|
||||
if (p->url_param_name)
|
||||
free(p->url_param_name);
|
||||
|
||||
|
@ -3222,8 +3222,8 @@ int process_srv(struct session *t)
|
||||
t->be->cookie_name,
|
||||
t->srv->cookie ? t->srv->cookie : "; Expires=Thu, 01-Jan-1970 00:00:01 GMT");
|
||||
|
||||
if (t->be->cookiedomain)
|
||||
len += sprintf(trash+len, "; domain=%s", t->be->cookiedomain);
|
||||
if (t->be->cookie_domain)
|
||||
len += sprintf(trash+len, "; domain=%s", t->be->cookie_domain);
|
||||
|
||||
if (unlikely(http_header_add_tail2(rep, &txn->rsp, &txn->hdr_idx,
|
||||
trash, len)) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user