curl-library
Re: POST problems
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 12 Nov 2004 00:11:52 +0100 (CET)
Date: Fri, 12 Nov 2004 00:11:52 +0100 (CET)
On Thu, 11 Nov 2004, Mohun Biswas wrote:
>> I can only agree. I'll write up a few test cases and make sure libcurl
>> stops doing this. Passing a NULL will then simply do a zero byte POST.
>
> Absolutely. Thanks.
I was a bit too quick in promising this.
Since you can actually provide POST-data with a read callback, setting
POSTFIELDS to NULL is simply a way to say that the data will be provided by a
callback. But, at least setting POSTFIELDS to NULL will no longer do a GET.
Setting POSTFIELDS to "" will send a zero byte POST and setting POSTFIELDS to
NULL and CURLOPT_POSTFIELDSIZE to zero will also make a zero byte POST.
Setting HTTPPOST to NULL makes a zero byte post.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-11-12