cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Impossible to POST binary data with CURLOPT_POSTFIELDS

From: Spacen Jasset <spacenjasset_at_yahoo.co.uk>
Date: Fri, 12 Oct 2007 13:52:04 +0100

Daniel Stenberg wrote:
> On Fri, 12 Oct 2007, Patrick Monnerat wrote:
>
>> An other solution would be to revert CURLOPT_POSTFIELDS to the
>> non-copy version, and add a new option CURLOPT_COPYPOSTFIELDS. This
>> will restore binary compatibility with pre 7.17.0 applications and
>> allow the copy feature too...
>
> Given the current facts and feedback, I guess this is the best idea so
> far. It will of course make CURLOPT_POSTFIELDS act in a non-obvious way
> compared to all the other setopt() arguments (thus it may lead to some
> surprising bugs for users) and CURLOPT_COPYPOSTFIELDS would need to have
> the size set before it can copy the fields (if binary contents are
> desired).
>
If this were adopted can't an extra varargs parameter be added. giving:

curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, data, size);
Received on 2007-10-12