From 755f98e7687a1fc2a7ff363212803b39897897a0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 21 May 2004 20:40:15 +0000 Subject: While talking to host a.b.c, libcurl did wrongly not accept cookies that were set to the domain .a.b.c (that is with a dot prefix). This is now fixed and test case 171 verifies it. --- lib/cookie.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/cookie.c b/lib/cookie.c index 693b5f98e..d31bcd114 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -261,6 +261,9 @@ Curl_cookie_add(struct SessionHandle *data, /* Now, we make sure that our host is within the given domain, or the given domain is not valid and thus cannot be set. */ + if('.' == whatptr[0]) + whatptr++; /* ignore preceeding dot */ + if(!domain || tailmatch(whatptr, domain)) { const char *tailptr=whatptr; if(tailptr[0] == '.') -- cgit v1.2.3