From: Jay Satiro Date: Sat, 15 Feb 2020 23:17:31 +0000 (-0500) Subject: CURLINFO_COOKIELIST.3: Fix example X-Git-Tag: curl-7_69_0~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03564deba2039e3530bb166ddaddd0ec58ff045c;p=thirdparty%2Fcurl.git 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 --- diff --git a/docs/libcurl/opts/CURLINFO_COOKIELIST.3 b/docs/libcurl/opts/CURLINFO_COOKIELIST.3 index a204890648..8ff24a579d 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 */