curl-library
Re: documentation update
Date: Tue, 18 Nov 2014 13:28:43 -0800
On 11/18/14, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> 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.
I hear you, and don't necessarily disagree -- however -- if you look
at CURLOPT_POSTFIELDS as being affected by CURLOPT_COPYPOSTFIELDS,
even though neither of these are defaults, some notice isn't entirely
unreasonable.
I'm happy to defer determining what's "reasonable" here -- at stake
are clarity/notice vs. economy-of-words(?) and maintenance (is this
verbage I'm promoting too coddling ? Is this going to open up a
maintenance nightmare whereby everybody expects to have their hands
held everywhere in the documentation ? (I'm being hyperbolic on
purpose)).
That said: I don't need to bikeshed this, so, take my simple patch and
apply however you see fit. :)
Kind Regards,
-bch
>> 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
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-18