cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Endless waiting on POST with zero content length

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 6 Jul 2007 23:16:09 +0200 (CEST)

On Thu, 5 Jul 2007, Emil Romanus wrote:

> Problem solved! Did the following:
> curl_easy_setopt(q->client, CURLOPT_POSTFIELDSIZE, 0);

[...]

> The first request used CURLOPT_POSTFIELDS... The second request set that
> same option to NULL. This must have confused libcurl, resulting in libcurl
> having no idea how to calculate the content length.

I can't find any libcurl docs anywhere that says setting CURLOPT_POSTFIELDS to
NULL is a good idea for any purpose.

CURLOPT_POSTFIELDSIZE overrides getting the size from the given pointer, did
you by any chance have that already set?

Since you didn't show us a complete example, I have trouble to see how this is
a bug in libcurl or if so, what the exact problem might be.

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