cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: documentation update

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 18 Nov 2014 21:56:37 +0100

On Tue, Nov 18, 2014 at 12:00:51PM -0800, bch wrote:
> On 11/18/14, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> > 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.
>
> If I understand correctly, there is a condition -- if you've set the
> CURLOPT_COPYPOSTFIELDS. If you set this the data is copied -- it's
> necessary to set it explicitly (hence my note "By default" -- which I
> meant to mean "This is the typical behaviour, but there are conditions
> where this doesn't happen" (COPYPOSTFIELDS).

But this entire man page describes CURLOPT_POSTFIELDS, not
CURLOPT_COPYPOSTFIELDS. CURLOPT_POSTFIELDS is no more a "default" than
CURLOPT_XFERINFODATA is.

> It's not even clear to me that "by default" is enough -- I don't know
> if a user of this function would browse all the SEE ALSO links.
> Perhaps the "by default" should be more explicit. I'm also open to
> being wrong about the "by default", but I'm not convinced I'm wrong,
> yet :)

It's probably not a bad idea to make the user aware that there is an
alternative. Maybe saying (my emphasis):

   The data pointed to is NOT copied by the library USING THIS OPTION...

or adding a sentence at the end of this paragraph suggesting that
CURLOPT_COPYPOSTFIELDS is a way around this limitation.

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