mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
mime: be tolerant about setting twice the same header list in a part.
This commit is contained in:
parent
14d6e207d3
commit
93e62adde8
@ -1356,7 +1356,8 @@ CURLcode curl_mime_headers(curl_mimepart *part,
|
|||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
||||||
if(part->flags & MIME_USERHEADERS_OWNER) {
|
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->flags &= ~MIME_USERHEADERS_OWNER;
|
||||||
}
|
}
|
||||||
part->userheaders = headers;
|
part->userheaders = headers;
|
||||||
|
Loading…
Reference in New Issue
Block a user