aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-08-02 13:26:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-08-02 13:26:06 +0000
commit5a6dcdc36c33e15f1b32f08bf885ec5d48b27aec (patch)
tree9800edd863802bd7676dc3190615f51022df3a2f
parent59c16a570fffdb9442e1ff0ceb4dca93950cd57c (diff)
clarify that setting POSTFIELDS to NULL or "" is not enough to make a zero byte
POST
-rw-r--r--docs/libcurl/curl_easy_setopt.36
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 016bb9181..62d8aa1b0 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -670,6 +670,12 @@ set that Content-Type by default when this option is used), which is the most
commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
+If you want to do a zero-byte POST, you need to set
+\fICURLOPT_POSTFIELDSIZE\fP explicitly to zero, as simply setting
+\fICURLOPT_POSTFIELDS\fP to NULL or "" just effectively disables the sending
+of the specified string. libcurl will instead assume that you'll send the POST
+data using the read callback!
+
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.