gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 20/73: mime: be tolerant about setting twice the sa


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 20/73: mime: be tolerant about setting twice the same header list in a part.
Date: Tue, 24 Oct 2017 18:54:01 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 93e62adde88b6ae29767d977b6a813df21c32f02
Author: Patrick Monnerat <address@hidden>
AuthorDate: Sun Oct 8 16:20:13 2017 +0100

    mime: be tolerant about setting twice the same header list in a part.
---
 lib/mime.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/mime.c b/lib/mime.c
index 496f5e6fb..7cfce6ae8 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -1356,7 +1356,8 @@ CURLcode curl_mime_headers(curl_mimepart *part,
     return CURLE_BAD_FUNCTION_ARGUMENT;
 
   if(part->flags & MIME_USERHEADERS_OWNER) {
-    curl_slist_free_all(part->userheaders);
+    if(part->userheaders != headers)  /* Allow setting twice the same list. */
+      curl_slist_free_all(part->userheaders);
     part->flags &= ~MIME_USERHEADERS_OWNER;
   }
   part->userheaders = headers;

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



reply via email to

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