curl-users
Re: curl: (18) transfer closed with outstanding read data remaining
Date: Sun, 18 Mar 2007 23:23:22 +0100 (CET)
On Sun, 18 Mar 2007, Steven Lacroix wrote:
> I ran into a problem (perhaps bug) when doing a post to a internal web
> server using the command line tool. No data is being returned when posting a
> large amount of data (See config). As soon as I make the post data slightly
> shorter, the data returns just fine. What is weird is that if I try and do
> the same post to say google.com, data is returned just fine.
I would say this sounds like a bug in the server and not in the client. Did
you try to "snoop" on the network to confirm your conclusion is the right one?
You're using a recent curl version I presume?
>> I believe it to be that the server is returning
> "Transfer-Encoding: chunked". Isn't that only supported for uploads only?
Nope.
> Shouldn't the server not send chunked back?
It is perfectly fine to send chunked back in HTTP 1.1.
> header = "Content-Length: 1025"
My advice is to let curl set the length by itself, to avoid the problems that
occur if you happen to set the wrong size.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-03-18