|
This repairs cookies for localhost |
|
--- |
|
lib/cookie.c | 8 +------- |
|
1 file changed, 1 insertion(+), 7 deletions(-) |
|
|
|
diff --git a/lib/cookie.c b/lib/cookie.c |
|
index 092a226f3..9305b0a7f 100644 |
|
--- a/lib/cookie.c |
|
+++ b/lib/cookie.c |
|
@@ -3,11 +3,11 @@ |
|
* Project ___| | | | _ \| | |
|
* / __| | | | |_) | | |
|
* | (__| |_| | _ <| |___ |
|
* \___|\___/|_| \_\_____| |
|
* |
|
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al. |
|
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <[email protected]>, et al. |
|
* |
|
* This software is licensed as described in the file COPYING, which |
|
* you should have received as part of this distribution. The terms |
|
* are also available at https://curl.haxx.se/docs/copyright.html. |
|
* |
|
@@ -490,25 +490,19 @@ Curl_cookie_add(struct Curl_easy *data, |
|
break; |
|
} |
|
} |
|
else if(strcasecompare("domain", name)) { |
|
bool is_ip; |
|
- const char *dotp; |
|
|
|
/* 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 preceding dot */ |
|
|
|
is_ip = isip(domain ? domain : whatptr); |
|
|
|
- /* check for more dots */ |
|
- dotp = strchr(whatptr, '.'); |
|
- if(!dotp) |
|
- domain=":"; |
|
- |
|
if(!domain |
|
|| (is_ip && !strcmp(whatptr, domain)) |
|
|| (!is_ip && tailmatch(whatptr, domain))) { |
|
strstore(&co->domain, whatptr); |
|
if(!co->domain) { |
|
-- |
|
2.11.0 |