aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-03-25 09:08:33 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-03-25 09:08:33 +0000
commit541e5a3b827e6bbd236831fec7e7089664ea5b1c (patch)
tree8c1ee0a597663f6a53850770c1e3d041b0a54b8e /lib/cookie.c
parent5af61716aaf4968abfc27d5feaaa7d1d9a27d590 (diff)
Jacky Lam cookie parser fix for domains with preceeding dot
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 96452abfd..fbf2ed0c4 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -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)