gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 120/282: CURLINFO_COOKIELIST.3: Fix example


From: gnunet
Subject: [gnurl] 120/282: CURLINFO_COOKIELIST.3: Fix example
Date: Wed, 01 Apr 2020 14:29:45 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 03564deba2039e3530bb166ddaddd0ec58ff045c
Author: Jay Satiro <address@hidden>
AuthorDate: Sat Feb 15 18:17:31 2020 -0500

    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: address@hidden
    
    Fixes https://github.com/curl/curl/issues/4930
---
 docs/libcurl/opts/CURLINFO_COOKIELIST.3 | 6 +++---
 1 file 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 */

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]