mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:33:31 +03:00
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
This commit is contained in:
parent
001ab7d860
commit
3013bb6b1c
3 changed files with 13 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue