aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2015-06-03 21:48:47 -0400
committerJay Satiro <raysatiro@yahoo.com>2015-06-03 21:48:47 -0400
commit3013bb6b1c8e63e46ed0324eddffa6c54228acd7 (patch)
treeac7fa2d8b88f69a0899f8e55bff143cd0f214a22 /lib
parent001ab7d86092f715088a8611a675f8b2537f45b3 (diff)
cookie: Stop exporting any-domain cookies
Prior to this change any-domain cookies (cookies without a domain that are sent to any domain) were exported with domain name "unknown". Bug: https://github.com/bagder/curl/issues/292
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index fd7ed4168..94f2a8b85 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -1277,6 +1277,8 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
co = c->cookies;
while(co) {
+ if(!co->domain)
+ continue;
format_ptr = get_netscape_format(co);
if(format_ptr == NULL) {
fprintf(out, "#\n# Fatal libcurl error\n");
@@ -1310,7 +1312,8 @@ struct curl_slist *Curl_cookie_list(struct SessionHandle *data)
c = data->cookies->cookies;
while(c) {
- /* fill the list with _all_ the cookies we know */
+ if(!c->domain)
+ continue;
line = get_netscape_format(c);
if(!line) {
curl_slist_free_all(list);