cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl: (18) transfer closed with at least 2727 bytes remaining

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 20 Feb 2003 15:52:49 +0100 (CET)

On Thu, 20 Feb 2003, Richard Chen wrote:

> I got a message when I explicitly specify not to use keep alive:
>
> curl --header 'Connection: close' -i -v <url>
>
> Since keep alive is used for multiple url transfers,

"Keep alive" is always used for HTTP 1.1, but it shouldn't cause you any
problems so disabling it should not be needed.

> I expect that the transfer will be finished completely. But I got the
> message:
>
> curl: (18) transfer closed with at least 2727 bytes remaining
>
> If curl knows about how much data to receive and the server will send out
> those data before closing, how can the above error occur?

The server will tell the client how many bytes to expect. The client
downloads the data and counts the amount received.

When the connection is closed, the client can easily see if the two different
amounts differ. And then it says this.

> Is 'keep alive' always needed?

No. And you'll see that you won't get this problem when you try this on more
servers. I just did and I can't make it fail...

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
Received on 2003-02-20