cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP Post with digest

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 12 Mar 2008 14:08:48 +0100 (CET)

On Wed, 12 Mar 2008, Raf Nulens wrote:

>> How big are your posts? libcurl does treat posts a little differently
>> depending on the size of the data.
>
> The data blocks of the read callback have a size of 16384 bytes. When we're
> using CURLOPT_POSTFIELDS the size ranges from a few hundred bytes to
> 200000+.

Okay, I wrote up the attached example code and here are my thoughts:

#1 - There's a bug in that the timeout libcurl should use to wait for a 100
      continue before it ignores that and continues anyway, is always ignored.
      This will of course make libcurl continue too often with the sending.

It would be easy to assume this is what you experience. (commit to fix this
issue will be done soon)

However:

#2 - This site ignores this header and even when I experimented and had the
      code wait for 30 seconds it never sent anything back, but libcurl had to
      continue sending its request-body only to get a 401 back after it had
      completed it.

So, I don't see how libcurl could do this any differently. Since you claim a
different behavior when you used CURLOPT_POSTFIELDS, did you actually use the
exact same target URL when you did that? Because I can't see how libcurl can
do much different given how the server responds.

Can you?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Received on 2008-03-12