mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Jacky Lam cookie parser fix for domains with preceeding dot
This commit is contained in:
parent
5af61716aa
commit
541e5a3b82
@ -347,7 +347,13 @@ Curl_cookie_add(struct CookieInfo *c,
|
||||
/* the names are identical */
|
||||
|
||||
if(clist->domain && co->domain) {
|
||||
if(strequal(clist->domain, co->domain))
|
||||
if(strequal(clist->domain, co->domain) ||
|
||||
(clist->domain[0]=='.' &&
|
||||
strequal(&(clist->domain[1]), co->domain)) ||
|
||||
(co->domain[0]=='.' &&
|
||||
strequal(clist->domain, &(co->domain[1]))) )
|
||||
/* The domains are identical, or at least identical if you skip the
|
||||
preceeding dot */
|
||||
replace_old=TRUE;
|
||||
}
|
||||
else if(!clist->domain && !co->domain)
|
||||
|
Loading…
Reference in New Issue
Block a user