Loading docs/examples/multi-post.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -51,17 +51,17 @@ int main(void) /* Fill in the file upload field */ /* Fill in the file upload field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "sendfile", CURL_ZERO_TERMINATED); curl_mime_name(field, "sendfile"); curl_mime_filedata(field, "multi-post.c"); curl_mime_filedata(field, "multi-post.c"); /* Fill in the filename field */ /* Fill in the filename field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "filename", CURL_ZERO_TERMINATED); curl_mime_name(field, "filename"); curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED); curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED); /* Fill in the submit field too, even if this is rarely needed */ /* Fill in the submit field too, even if this is rarely needed */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "submit", CURL_ZERO_TERMINATED); curl_mime_name(field, "submit"); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); /* initialize custom header list (stating that Expect: 100-continue is not /* initialize custom header list (stating that Expect: 100-continue is not Loading docs/examples/postit2.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -61,17 +61,17 @@ int main(int argc, char *argv[]) /* Fill in the file upload field */ /* Fill in the file upload field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "sendfile", CURL_ZERO_TERMINATED); curl_mime_name(field, "sendfile"); curl_mime_filedata(field, "postit2.c"); curl_mime_filedata(field, "postit2.c"); /* Fill in the filename field */ /* Fill in the filename field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "filename", CURL_ZERO_TERMINATED); curl_mime_name(field, "filename"); curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED); curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED); /* Fill in the submit field too, even if this is rarely needed */ /* Fill in the submit field too, even if this is rarely needed */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "submit", CURL_ZERO_TERMINATED); curl_mime_name(field, "submit"); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); /* initialize custom header list (stating that Expect: 100-continue is not /* initialize custom header list (stating that Expect: 100-continue is not Loading docs/libcurl/curl_formadd.3 +7 −7 Original line number Original line Diff line number Diff line Loading @@ -62,16 +62,15 @@ parts. .IP CURLFORM_COPYNAME .IP CURLFORM_COPYNAME followed by a string which provides the \fIname\fP of this part. libcurl followed by a string which provides the \fIname\fP of this part. libcurl copies the string so your application doesn't need to keep it around after copies the string so your application doesn't need to keep it around after this function call. If the name isn't NUL-terminated, or if you'd this function call. If the name isn't NUL-terminated, you must set its length like it to contain zero bytes, you must set its length with with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain \fBCURLFORM_NAMELENGTH\fP. The copied data will be freed by zero-valued bytes. The copied data will be freed by \fIcurl_formfree(3)\fP. \fIcurl_formfree(3)\fP. .IP CURLFORM_PTRNAME .IP CURLFORM_PTRNAME followed by a string which provides the \fIname\fP of this part. libcurl followed by a string which provides the \fIname\fP of this part. libcurl will use the pointer and refer to the data in your application, so you will use the pointer and refer to the data in your application, so you must make sure it remains until curl no longer needs it. If the name must make sure it remains until curl no longer needs it. If the name isn't NUL-terminated, or if you'd like it to contain zero isn't NUL-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP. bytes, you must set its length with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain zero-valued bytes. .IP CURLFORM_COPYCONTENTS .IP CURLFORM_COPYCONTENTS followed by a pointer to the contents of this part, the actual data followed by a pointer to the contents of this part, the actual data to send away. libcurl copies the provided data, so your application doesn't to send away. libcurl copies the provided data, so your application doesn't Loading Loading @@ -172,7 +171,8 @@ you've called \fIcurl_easy_cleanup(3)\fP for the curl handle. See example below. See example below. .SH AVAILABILITY .SH AVAILABILITY Deprecated in 7.56.0. Deprecated in 7.56.0. Before this release, field names were allowed to contain zero-valued bytes. .SH RETURN VALUE .SH RETURN VALUE 0 means everything was ok, non-zero means an error occurred corresponding 0 means everything was ok, non-zero means an error occurred corresponding to a CURL_FORMADD_* constant defined in to a CURL_FORMADD_* constant defined in Loading docs/libcurl/curl_mime_addpart.3 +1 −1 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ A mime part structure handle, or NULL upon failure. /* continue and set name + data to the part */ /* continue and set name + data to the part */ curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED); curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED); curl_mime_name(part, "data", CURL_ZERO_TERMINATED); curl_mime_name(part, "data"); .fi .fi .SH "SEE ALSO" .SH "SEE ALSO" .BR curl_mime_init "(3)," .BR curl_mime_init "(3)," Loading docs/libcurl/curl_mime_data.3 +2 −2 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,6 @@ CURLE_OK or a CURL error code upon failure. .fi .fi .SH "SEE ALSO" .SH "SEE ALSO" .BR curl_mime_addpart "(3)," .BR curl_mime_addpart "(3)," .BR curl_mime_data_cb "(3)" .BR curl_mime_data_cb "(3)," .BR curl_mime_name "(3)" .BR curl_mime_name "(3)," .BR curl_mime_type "(3)" .BR curl_mime_type "(3)" Loading
docs/examples/multi-post.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -51,17 +51,17 @@ int main(void) /* Fill in the file upload field */ /* Fill in the file upload field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "sendfile", CURL_ZERO_TERMINATED); curl_mime_name(field, "sendfile"); curl_mime_filedata(field, "multi-post.c"); curl_mime_filedata(field, "multi-post.c"); /* Fill in the filename field */ /* Fill in the filename field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "filename", CURL_ZERO_TERMINATED); curl_mime_name(field, "filename"); curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED); curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED); /* Fill in the submit field too, even if this is rarely needed */ /* Fill in the submit field too, even if this is rarely needed */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "submit", CURL_ZERO_TERMINATED); curl_mime_name(field, "submit"); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); /* initialize custom header list (stating that Expect: 100-continue is not /* initialize custom header list (stating that Expect: 100-continue is not Loading
docs/examples/postit2.c +3 −3 Original line number Original line Diff line number Diff line Loading @@ -61,17 +61,17 @@ int main(int argc, char *argv[]) /* Fill in the file upload field */ /* Fill in the file upload field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "sendfile", CURL_ZERO_TERMINATED); curl_mime_name(field, "sendfile"); curl_mime_filedata(field, "postit2.c"); curl_mime_filedata(field, "postit2.c"); /* Fill in the filename field */ /* Fill in the filename field */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "filename", CURL_ZERO_TERMINATED); curl_mime_name(field, "filename"); curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED); curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED); /* Fill in the submit field too, even if this is rarely needed */ /* Fill in the submit field too, even if this is rarely needed */ field = curl_mime_addpart(form); field = curl_mime_addpart(form); curl_mime_name(field, "submit", CURL_ZERO_TERMINATED); curl_mime_name(field, "submit"); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); curl_mime_data(field, "send", CURL_ZERO_TERMINATED); /* initialize custom header list (stating that Expect: 100-continue is not /* initialize custom header list (stating that Expect: 100-continue is not Loading
docs/libcurl/curl_formadd.3 +7 −7 Original line number Original line Diff line number Diff line Loading @@ -62,16 +62,15 @@ parts. .IP CURLFORM_COPYNAME .IP CURLFORM_COPYNAME followed by a string which provides the \fIname\fP of this part. libcurl followed by a string which provides the \fIname\fP of this part. libcurl copies the string so your application doesn't need to keep it around after copies the string so your application doesn't need to keep it around after this function call. If the name isn't NUL-terminated, or if you'd this function call. If the name isn't NUL-terminated, you must set its length like it to contain zero bytes, you must set its length with with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain \fBCURLFORM_NAMELENGTH\fP. The copied data will be freed by zero-valued bytes. The copied data will be freed by \fIcurl_formfree(3)\fP. \fIcurl_formfree(3)\fP. .IP CURLFORM_PTRNAME .IP CURLFORM_PTRNAME followed by a string which provides the \fIname\fP of this part. libcurl followed by a string which provides the \fIname\fP of this part. libcurl will use the pointer and refer to the data in your application, so you will use the pointer and refer to the data in your application, so you must make sure it remains until curl no longer needs it. If the name must make sure it remains until curl no longer needs it. If the name isn't NUL-terminated, or if you'd like it to contain zero isn't NUL-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP. bytes, you must set its length with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain zero-valued bytes. .IP CURLFORM_COPYCONTENTS .IP CURLFORM_COPYCONTENTS followed by a pointer to the contents of this part, the actual data followed by a pointer to the contents of this part, the actual data to send away. libcurl copies the provided data, so your application doesn't to send away. libcurl copies the provided data, so your application doesn't Loading Loading @@ -172,7 +171,8 @@ you've called \fIcurl_easy_cleanup(3)\fP for the curl handle. See example below. See example below. .SH AVAILABILITY .SH AVAILABILITY Deprecated in 7.56.0. Deprecated in 7.56.0. Before this release, field names were allowed to contain zero-valued bytes. .SH RETURN VALUE .SH RETURN VALUE 0 means everything was ok, non-zero means an error occurred corresponding 0 means everything was ok, non-zero means an error occurred corresponding to a CURL_FORMADD_* constant defined in to a CURL_FORMADD_* constant defined in Loading
docs/libcurl/curl_mime_addpart.3 +1 −1 Original line number Original line Diff line number Diff line Loading @@ -51,7 +51,7 @@ A mime part structure handle, or NULL upon failure. /* continue and set name + data to the part */ /* continue and set name + data to the part */ curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED); curl_mime_data(part, "This is the field data", CURL_ZERO_TERMINATED); curl_mime_name(part, "data", CURL_ZERO_TERMINATED); curl_mime_name(part, "data"); .fi .fi .SH "SEE ALSO" .SH "SEE ALSO" .BR curl_mime_init "(3)," .BR curl_mime_init "(3)," Loading
docs/libcurl/curl_mime_data.3 +2 −2 Original line number Original line Diff line number Diff line Loading @@ -64,6 +64,6 @@ CURLE_OK or a CURL error code upon failure. .fi .fi .SH "SEE ALSO" .SH "SEE ALSO" .BR curl_mime_addpart "(3)," .BR curl_mime_addpart "(3)," .BR curl_mime_data_cb "(3)" .BR curl_mime_data_cb "(3)," .BR curl_mime_name "(3)" .BR curl_mime_name "(3)," .BR curl_mime_type "(3)" .BR curl_mime_type "(3)"