diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2020-02-15 18:17:31 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2020-02-15 18:17:31 -0500 |
commit | 03564deba2039e3530bb166ddaddd0ec58ff045c (patch) | |
tree | 5a3967a01e13d34cb2dbfa95e62f1e6c85c24222 /docs/libcurl/opts | |
parent | b26c92fbf04d2bc41a42f059f67ef2a5dc75cc62 (diff) |
CURLINFO_COOKIELIST.3: Fix example
Prior to this change the example would try to import cookies from stdin,
which wasn't what was intended.
Reported-by: 3dyd@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/4930
Diffstat (limited to 'docs/libcurl/opts')
-rw-r--r-- | docs/libcurl/opts/CURLINFO_COOKIELIST.3 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 index a20489064..8ff24a579 100644 --- a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 +++ b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 @@ -45,8 +45,8 @@ CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); - /* enable the cookie engine with a non-existing file */ - curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "-"); + /* enable the cookie engine */ + curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); res = curl_easy_perform(curl); @@ -58,7 +58,7 @@ if(curl) { /* a linked list of cookies in cookie file format */ struct curl_slist *each = cookies; while(each) { - printf("%s", each->data); + printf("%s\\n", each->data); each = each->next; } /* we must free these cookies when we're done */ |