cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Libcurl request generating HTTP/1.1 411 Length Required error

From: Jacob Swed <gryla_at_earthlink.net>
Date: Tue, 13 Jan 2004 14:53:51 -0800

Unfortunately, that patch seems to make things worse. Watching curl
with a packet sniffer it does send the PUT with the Content-Length
header set correctly but it does not follow the transmission of the
header with any data. Once the server receives the header it waits for
the content to follow effectively bringing everything to a full stop.

I was able to hack a fix for this that is not optimal but works. I
removed the line that overrode the request to make it a get. I did need
to change the CURLOPT_READFUNCTION though to reset the buffer once it
had been read so that it could be read again. This was to make sure the
right thing happened when curl sent the buffer more than once during
NTLM authentication for example. Again, not the right fix but it did
workaround the problem.

Thanks,
jacob

On Thursday, January 8, 2004, at 12:24 AM, Daniel Stenberg wrote:

> On Wed, 24 Dec 2003, Jacob Swed wrote:
>
> Hi Jacob,
>
> Can you try applying the attached patch and let me know if this makes
> libcurl
> behave any better for your use case?
>
> It is not a complete fix and it breaks at least test case 88, but it
> would
> help me to know if this approach is workable.
>
> --
> Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
> [[ Do not send mails to this email address. They won't reach me.
> ]]<getpostauth.patch>

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
Received on 2004-01-20