aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c3
1 files changed, 3 insertions, 0 deletions
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] == '.')