cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Serverside disconnection vs. simple Closing connection #n

From: Jamie Lokier <jamie_at_shareable.org>
Date: Thu, 23 Apr 2009 12:30:58 +0100

Istvan Hoffmann wrote:
> This http connection is a stream transfer, after the connection established
> and received the headers the body part transfer will keep to the end of the
> time (or to user break or server disconnection).

So you don't need curl to tell you it's an error. You know it's an
error when curl says it's finished on that resource, because _you_ know
that should not happen _for that resource_.

> May be as a deal you can add a new option that can be set via
> curl_easy_setopt to let the user control if curl treats a server side
> disconnection as an error or just an ignorable warning?
> What do you think?

Why do you need that option? If you have to change your application
to set the option, it means you want to use HTTP in a special way for
a particular resource. Because you know the resource is an infinite
stream, it should not end. So you can just instead change your
application to say that "end of transfer" is an error for this
resource.

(It would be better if you can change the server to use chunked
encoding though.)

-- Jamie
Received on 2009-04-23