Skip to content

Commit

Permalink
curl_formadd.3: setting CURLFORM_CONTENTSLENGTH 0 zero means strlen
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Aug 29, 2014
1 parent 7bff23b commit 367b784
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/libcurl/curl_formadd.3
Expand Up @@ -86,6 +86,10 @@ you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP.
.IP CURLFORM_CONTENTSLENGTH
followed by a long giving the length of the contents. Note that for
\fICURLFORM_STREAM\fP contents, this option is mandatory.

If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
the contents to figure out the size. If you really want to send a zero byte
content then you must make sure strlen() on the data pointer returns zero.
.IP CURLFORM_FILECONTENT
followed by a filename, causes that file to be read and its contents used
as data in this part. This part does \fInot\fP automatically become a file
Expand Down

0 comments on commit 367b784

Please sign in to comment.