From: Dan Fandrich Date: Tue, 17 Jan 2023 22:21:07 +0000 (-0800) Subject: docs: POSTFIELDSIZE must be set to -1 with read function X-Git-Tag: curl-7_88_0~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a70403cff2bfc01621abfa6ee432aa84542eb4c;p=thirdparty%2Fcurl.git docs: POSTFIELDSIZE must be set to -1 with read function Reported-by: RanBarLavie on github Closes #10313 --- diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 index cf6e09a3de..57ff8f4e4b 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 @@ -32,10 +32,11 @@ CURLOPT_POSTFIELDSIZE \- size of POST data pointed to CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size); .fi .SH DESCRIPTION -If you want to post data to the server without having libcurl do a strlen() to -measure the data size, this option must be used. When this option is used you -can post fully binary data, which otherwise is likely to fail. If this size is -set to -1, the library will use strlen() to get the size. +If you want to post static data to the server without having libcurl do a +strlen() to measure the data size, this option must be used. When this option +is used you can post fully binary data, which otherwise is likely to fail. If +this size is set to -1, the library will use strlen() to get the size or rely +on the \fICURLOPT_READFUNCTION\fP (if used) to signal the end of data. If you post more than 2GB, use \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP. .SH DEFAULT diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 index 3aac817334..220ba0d3dd 100644 --- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 +++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 @@ -32,10 +32,11 @@ CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE_LARGE, curl_off_t size); .SH DESCRIPTION -If you want to post data to the server without having libcurl do a strlen() to -measure the data size, this option must be used. When this option is used you -can post fully binary data, which otherwise is likely to fail. If this size is -set to -1, the library will use strlen() to get the size. +If you want to post static data to the server without having libcurl do a +strlen() to measure the data size, this option must be used. When this option +is used you can post fully binary data, which otherwise is likely to fail. If +this size is set to -1, the library will use strlen() to get the size or rely +on the \fICURLOPT_READFUNCTION\fP (if used) to signal the end of data. .SH DEFAULT -1 .SH PROTOCOLS