summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-23 17:14:58 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-23 23:20:31 +0200
commitf014eeceb218200c5864ce91a8de2cc21d951c32 (patch)
tree076e52732b212c95a0d2f11c28f774983e02b116
parenta60b111980ad0270528a972d5b1f61d327729be2 (diff)
downloadcurl-f014eeceb218200c5864ce91a8de2cc21d951c32.tar.gz
CURLOPT_POSTFIELDS.3: clarify how it gets the size of the data
Ref: https://curl.se/mail/lib-2021-04/0085.html Closes #6943
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTFIELDS.37
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
index abbb81b3f..fff9ae902 100644
--- a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -52,6 +52,11 @@ the POST data from the read callback. If you want to send a zero-byte POST set
\fICURLOPT_POSTFIELDS(3)\fP to an empty string, or set \fICURLOPT_POST(3)\fP to
1 and \fICURLOPT_POSTFIELDSIZE(3)\fP to 0.
+libcurl will use assume this option points to a nul-terminated string unless
+you also set \fICURLOPT_POSTFIELDSIZE(3)\fP to specify the length of the
+provided data, which then is strictly required if you want to send off nul
+bytes included in the data.
+
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header,
and libcurl will add that header automatically if the POST is either known to
be larger than 1MB or if the expected size is unknown. You can disable this