cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: documentation update

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 18 Nov 2014 20:44:10 +0100

On Tue, Nov 18, 2014 at 10:57:57AM -0800, bch wrote:
> Inspired by one of Daniels recent podcasts. Note that I did *NOT*

Thanks for sending in a patch!

> patch the .html, because it looks like it's generated by a roff-tool
> of Daniels.

Correct; the web version is built from the troff source in git.

>
> Regards,
>
> -bch
>
> Index: src/vendor/curl/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
> ==================================================================
> --- src/vendor/curl/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
> +++ src/vendor/curl/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
> @@ -31,11 +31,11 @@
> Pass a char * as parameter, pointing to the full data to send in a HTTP POST
> operation. You must make sure that the data is formatted the way you want the
> server to receive it. libcurl will not convert or encode it for you in any
> way. For example, the web server may assume that this data is url-encoded.
>
> -The data pointed to is NOT copied by the library: as a consequence, it must be
> +By default, the data pointed to is NOT copied by the library: as a
> consequence, it must be
> preserved by the calling application until the associated transfer finishes.

I'm not sure I agree with this change. Adding "By default" implies that there
are some conditions under which the data IS copied by the library, but there
aren't. CURLOPT_POSTFIELDS never copies its data.
>
> This POST is a normal application/x-www-form-urlencoded kind (and libcurl will
> set that Content-Type by default when this option is used), which is commonly
> used by HTML forms. Change Content-Type with \fICURLOPT_HTTPHEADER(3)\fP.
> @@ -77,6 +77,6 @@
> .SH AVAILABILITY
> Always
> .SH RETURN VALUE
> Returns CURLE_OK
> .SH "SEE ALSO"
> -.BR CURLOPT_POSTFIELDSIZE "(3), " CURLOPT_READFUNCTION "(3), "
> +.BR CURLOPT_POSTFIELDSIZE "(3), " CURLOPT_READFUNCTION "(3), " CURLOPT_COPYPOSTFIELDS "(3)"

That one makes good sense.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-18