]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: clarify data replacement policy for MIME API
authorDaniel Gustafsson <daniel@yesql.se>
Mon, 16 May 2022 18:32:38 +0000 (20:32 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Mon, 16 May 2022 18:32:38 +0000 (20:32 +0200)
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 <daniel@haxx.se>
docs/libcurl/curl_mime_data.3
docs/libcurl/curl_mime_encoder.3
docs/libcurl/curl_mime_filedata.3
docs/libcurl/curl_mime_filename.3
docs/libcurl/curl_mime_headers.3
docs/libcurl/curl_mime_name.3
docs/libcurl/curl_mime_subparts.3
docs/libcurl/curl_mime_type.3

index 97f50035564ef64c9759b94fa9b23aeda0f3a779..55d77a7aeee8da9570d1a5fb8eacc2218c9cbad7 100644 (file)
@@ -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
index 5a4a43b12de1241ad5f114db26d0fec732bb3d19..65b2df7454b79187b59fc467253cd267df7ea476 100644 (file)
@@ -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
index f3411a3aabdf94e99f2783d1522472367e0f1d96..65de15d6bce5b81757d253d65880126e84eeccbd 100644 (file)
@@ -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;
index 9d3b79ba658d3e28d7642ac88fd51ec7f501a50e..6f62e9e9b90261711237c14db5cc0ecf23ddb820 100644 (file)
@@ -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;
index 7dd8b38f3df0a074e11c6d3188208c35cf63a33f..fc355a20510c6ee84629f2cee2e712358c7696c8 100644 (file)
@@ -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;
index 2c4ac6d35482021116154ffc4653c4c31ae50df7..2b7b4695867dcc81858c06f2eec3b9f5f7506969 100644 (file)
@@ -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;
index af842dbdf568fcdcf782cf28f59519e40ac29d39..dc99c944b755410adeafb0d18351cec74820fba6 100644 (file)
@@ -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
index 88748afbc8fb16069921a39c0ace658628383b02..3045eabef5a3bd7dd9de82b22063798d1f72a80e 100644 (file)
@@ -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: