From: Daniel Gustafsson Date: Mon, 16 May 2022 18:32:38 +0000 (+0200) Subject: docs: clarify data replacement policy for MIME API X-Git-Tag: curl-7_84_0~185 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2df67e93c35b74c567505d4400e02e88b2dbf499;p=thirdparty%2Fcurl.git docs: clarify data replacement policy for MIME API The API documentation for the MIME functions specify that the parts can be set twice, with the last call winning. While true, the user can set the parts n times for n > 2, reword to specify multiple API calls instead. Closes: #8860 Reviewed-by: Daniel Stenberg --- diff --git a/docs/libcurl/curl_mime_data.3 b/docs/libcurl/curl_mime_data.3 index 97f5003556..55d77a7aee 100644 --- a/docs/libcurl/curl_mime_data.3 +++ b/docs/libcurl/curl_mime_data.3 @@ -39,8 +39,8 @@ storage may safely be reused after call. character string. \fIpart\fP is the part's to assign contents to. -Setting a part's contents twice is valid: only the value set by the last call -is retained. It is possible to unassign part's contents by setting +Setting a part's contents multiple times is valid: only the value set by the +last call is retained. It is possible to unassign part's contents by setting \fIdata\fP to NULL. Setting large data is memory consuming: one might consider using diff --git a/docs/libcurl/curl_mime_encoder.3 b/docs/libcurl/curl_mime_encoder.3 index 5a4a43b12d..65b2df7454 100644 --- a/docs/libcurl/curl_mime_encoder.3 +++ b/docs/libcurl/curl_mime_encoder.3 @@ -37,8 +37,8 @@ transmitted. set to NULL to disable an encoder previously attached to the part. The encoding scheme storage may safely be reused after this function returns. -Setting a part's encoder twice is valid: only the value set by the last call is -retained. +Setting a part's encoder multiple times is valid: only the value set by the +last call is retained. Upon multipart rendering, the part's content is encoded according to the pertaining scheme and a corresponding \fI"Content-Transfer-Encoding"\fP header diff --git a/docs/libcurl/curl_mime_filedata.3 b/docs/libcurl/curl_mime_filedata.3 index f3411a3aab..65de15d6bc 100644 --- a/docs/libcurl/curl_mime_filedata.3 +++ b/docs/libcurl/curl_mime_filedata.3 @@ -52,8 +52,8 @@ If the file size cannot be determined before actually reading it (such as for a device or named pipe), the whole mime structure containing the part will be transferred as chunks by HTTP and rejected by IMAP. -Setting a part's contents twice is valid: only the value set by the last call -is retained. +Setting a part's contents multiple times is valid: only the value set by the +last call is retained. .SH EXAMPLE .nf curl_mime *mime; diff --git a/docs/libcurl/curl_mime_filename.3 b/docs/libcurl/curl_mime_filename.3 index 9d3b79ba65..6f62e9e9b9 100644 --- a/docs/libcurl/curl_mime_filename.3 +++ b/docs/libcurl/curl_mime_filename.3 @@ -42,7 +42,7 @@ to NULL to remove a previously attached remote file name. The remote file name string is copied into the part, thus the associated storage may safely be released or reused after call. Setting a part's file -name twice is valid: only the value set by the last call is retained. +name multiple times is valid: only the value set by the last call is retained. .SH EXAMPLE .nf curl_mime *mime; diff --git a/docs/libcurl/curl_mime_headers.3 b/docs/libcurl/curl_mime_headers.3 index 7dd8b38f3d..fc355a2051 100644 --- a/docs/libcurl/curl_mime_headers.3 +++ b/docs/libcurl/curl_mime_headers.3 @@ -41,8 +41,8 @@ to remove a previously attached custom header list. replacement or mime structure deletion; in this case the list must not be freed explicitly. -Setting a part's custom headers list twice is valid: only the value set by -the last call is retained. +Setting a part's custom headers list multiple times is valid: only the value +set by the last call is retained. .SH EXAMPLE .nf struct curl_slist *headers = NULL; diff --git a/docs/libcurl/curl_mime_name.3 b/docs/libcurl/curl_mime_name.3 index 2c4ac6d354..2b7b469586 100644 --- a/docs/libcurl/curl_mime_name.3 +++ b/docs/libcurl/curl_mime_name.3 @@ -37,9 +37,9 @@ fields are named. \fIname\fP points to the null-terminated name string. The name string is copied into the part, thus the associated storage may -safely be released or reused after call. Setting a part's name twice is valid: -only the value set by the last call is retained. It is possible to "unname" a -part by setting \fIname\fP to NULL. +safely be released or reused after call. Setting a part's name multiple times +is valid: only the value set by the last call is retained. It is possible to +"unname" a part by setting \fIname\fP to NULL. .SH EXAMPLE .nf curl_mime *mime; diff --git a/docs/libcurl/curl_mime_subparts.3 b/docs/libcurl/curl_mime_subparts.3 index af842dbdf5..dc99c944b7 100644 --- a/docs/libcurl/curl_mime_subparts.3 +++ b/docs/libcurl/curl_mime_subparts.3 @@ -39,9 +39,9 @@ structure. multipart part and must not be freed explicitly. It may however be updated by subsequent calls to mime API functions. -Setting a part's contents twice is valid: only the value set by the last call -is retained. It is possible to unassign previous part's contents by setting -\fIsubparts\fP to NULL. +Setting a part's contents multiple times is valid: only the value set by the +last call is retained. It is possible to unassign previous part's contents by +setting \fIsubparts\fP to NULL. .SH EXAMPLE .nf /* The inline part is an alternative proposing the html and the text diff --git a/docs/libcurl/curl_mime_type.3 b/docs/libcurl/curl_mime_type.3 index 88748afbc8..3045eabef5 100644 --- a/docs/libcurl/curl_mime_type.3 +++ b/docs/libcurl/curl_mime_type.3 @@ -37,8 +37,8 @@ CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype); set to NULL to remove a previously attached mime type. The mime type string is copied into the part, thus the associated storage may -safely be released or reused after call. Setting a part's type twice is valid: -only the value set by the last call is retained. +safely be released or reused after call. Setting a part's type multiple times +is valid: only the value set by the last call is retained. In the absence of a mime type and if needed by the protocol specifications, a default mime type is determined by the context: