Mention first version with CURLOPT_COPYPOSTFIELDS.

Don't confuse NUL with NULL.
This commit is contained in:
Dan Fandrich
2007-10-15 21:19:40 +00:00
parent add90abfa4
commit a83b5d1b67
3 changed files with 7 additions and 6 deletions

View File

@@ -727,18 +727,19 @@ data to figure out the size. This is the large file version of the
\fICURLOPT_POSTFIELDSIZE\fP option. (Added in 7.11.1)
.IP CURLOPT_COPYPOSTFIELDS
Pass a char * as parameter, which should be the full data to post in an HTTP
POST operation. It behaves has the \fICURLOPT_POSTFIELDS\fP option, but the
POST operation. It behaves as the \fICURLOPT_POSTFIELDS\fP option, but the
original data are copied by the library, allowing the application to overwrite
the original data after setting this option.
Because data are copied, care must be taken when using this option in
conjunction with \fICURLOPT_POSTFIELDSIZE\fP or
\fICURLOPT_POSTFIELDSIZE_LARGE\fP: If the size has not been set prior to
\fICURLOPT_COPYPOSTFIELDS\fP, the data are assumed to be a null-terminated
\fICURLOPT_COPYPOSTFIELDS\fP, the data are assumed to be a NUL-terminated
string; else the stored size informs the library about the data byte count to
copy. In any case, the size must not be changed after
\fICURLOPT_COPYPOSTFIELDS\fP, unless another \fICURLOPT_POSTFIELDS\fP or
\fICURLOPT_COPYPOSTFIELDS\fP option is issued.
(Added in 7.17.1)
.IP CURLOPT_HTTPPOST
Tells libcurl you want a multipart/formdata HTTP POST to be made and you