cURL / Mailing Lists / curl-users / Single Mail


Re: cURL behavior with streaming server ...

From: kedar mhaswade <>
Date: Mon, 11 Feb 2013 15:37:22 -0800

On Mon, Feb 11, 2013 at 2:39 PM, Daniel Stenberg <> wrote:

> On Mon, 11 Feb 2013, kedar mhaswade wrote:
> I am testing a HTTP streaming server and trying to understand how
>> streaming works, which sends the following [1] headers. When cURL receives
>> the response, as expected, it waits there for some time for the server to
>> send some more data. I have two questions in this regard:
>> 1- As you can see, there is no Transfer-Encoding: chunked header in the
>> response. It, as expected, lacks the Content-Length header. Is that the
>> hint for cURL to assume a streamed data? It's not clear from the Wikipedia
>> page <**Chunked_transfer_encoding<>>
>> when the client should assume chunked data to come from server.
> The hint is that there's no Content-Length, no chunked-encoding _and_
> there's a "Connection: close". It means the server will send the data and
> close the connection to signal the end of it. So as long as the connection
> stays open there is potentially more data coming...

I see. Thanks, Daniel.

> 2- What is the value of the timeout that cURL uses in this case before
>> closing the connection? Is that configurable?
> By default, curl won't timeout at all. It'll sit there waiting forever.
> You'll have to use one of the timeout options to make it stop at some point
> if the server doesn't close the connection...
> Hmm. I should have realized that. ( clearly documents this).
Thanks again!

> --
> /
> ------------------------------**------------------------------**-------
> List admin:**listinfo/curl-users<>
> FAQ:**html<>
> Etiquette:**etiquette.html<>

List admin:
Received on 2013-02-12