cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TLS security in Curl

From: Michael Wood <esiotrot_at_gmail.com>
Date: Thu, 6 Jan 2011 20:16:42 +0200

Hi

On 5 January 2011 23:22, amit paliwal <amit.ambitions_at_gmail.com> wrote:
>
> On Wed, Jan 5, 2011 at 3:45 PM, amit paliwal <amit.ambitions_at_gmail.com>
> wrote:
>>
>> On Wed, Jan 5, 2011 at 1:25 PM, Michael Wood <esiotrot_at_gmail.com> wrote:
[...]
>>> Well, this seems like you need to do a normal request using
>>> curl_easy_perform() and then the server will start sending back a
>>> response when it has something to send.  But instead of sending the
>>> whole response, it will leave the connection open and continue sending
>>> another part of the response later, and then another part later again.
>>
>> Reply: Perfectly this is what I need, now only questions is, am I able to
>> get this scenario with Curl??
>> How will the HTTP response be taken as partial at HTTP layer and not as
>> full. Is there a specific sub header or a field??? your answer to this will
>> solve all my worries. thanks a lot.
>
> Is it donw on the basis of MIME-TYPe, for e.g. if my MIME-TYPE is
> text/event-stream then it means more events are supposed to come???

No, not content-type, but rather transfer-encoding. The server must
NOT send Content-Length: xxx, because it will not know up front how
much data it will need to send. It must instead use "Chunked transfer
encoding" as described here:

http://en.wikipedia.org/wiki/Chunked_transfer_encoding

-- 
Michael Wood <esiotrot_at_gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-06