curl-library
Re: transfer closed with outstanding read data remaining with Expect: 100-continue
Date: Fri, 17 Oct 2008 23:24:22 -0700
On Fri, Oct 17, 2008 at 06:28:14PM -0700, Emanuel Norrbin wrote:
> thanks for your answer. Guess I should have been clear on what the actual
> error was...
> The problem is that curl_easy_perform returns CURLE_PARTIAL_FILE.
>
> I tried it again today with daily snapshot 7.19.1-20081017 but got the
> same result.
> I don't have more than one connection open and I use the easy interface.
The bug fix was for a situation that could happen with a single connection
that was persistent.
> I guess the strange part is the following:
>
> After the headers are sent the following headers are returned:
> HTTP/1.1 100 Continue
> Content-Length: 0
>
> then I send the data and get the following headers back:
>
> HTTP/1.1 200 OK
> Content-Encoding: gzip
> Server:
> Content-Type: text/xml; charset=utf-8
> Transfer-Encoding: chunked
> Date: Sat, 18 Oct 2008 00:57:19 GMT
>
> Then all of a sudden curl says "transfer closed with outstanding read
> data remaining".
curl will return that message when the socket has been closed before the
final terminating chunk of a chunky transfer is read. It sure sounds like
a server bug to me.
> I'm not too familiar with the http protocol. Are the headers and data
> sent on different connections?
They are sent on the same connection.
> It could also be that there is a bug on the server side. If I request
> chunked Transfer-Encoding then everything is fine.
> Any suggestions about how to go about debugging this?
It really does sound like a server problem. It seems that servers often
have trouble with Expect: 100-continue connections. But it's possible that
curl has trouble with a race condition near the end of a connection and the
data is actually there but curl is ignoring it. You could trace through
Curl_readwrite with a debugger and see what happens in this case. Is
there a public URL where we can try this situation out?
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-10-18