cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Impossible to POST binary data with CURLOPT_POSTFIELDS

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 12 Oct 2007 15:50:23 +0200 (CEST)

On Fri, 12 Oct 2007, Spacen Jasset wrote:

>> 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);

It could in theory, yes, but since we have ~140 options right now that takes a
single argument (after the option) only, I would rather not introduce it now.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-10-12