cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
Re: how libcurl receives chunked data from http server?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 22 Sep 2003 01:34:32 +0200 (CEST)
On Sat, 20 Sep 2003, Jerry G. Chiuan wrote:
> My http server responds to the client a huge data that can't be carried by
Are you seriously believing that all the applications that use libcurl,
libcurl supports sizes up to at least 2GB, and more than so if the server
> Its header has the field called "Transfer-Encoding: chunked", meanwhile it
libcurl supports and deals with chunked transfers. You should not even have to
> I have no idea why it carries "1ff8" between http header and http data. is
That's what the chunked encoding means. It basicly sends a series of blocks
> supposely the http header shall ends with "...."
A HTTP header ends with an empty line ending with CRLF.
> then followed by data part directly, right?
> - If yes, can libcurl receive all binary data at a time in libcurl's buffer?
libcurl will receive N bytes into its buffer and then call the write callback.
> I found that CURLOPT_WRITEFUNCTION would be called several times in order to
Yes of course.
> For instance, it might receive first 2 packets, then receive the rest etc...
You can't. Unless you patch libcurl to do so. I just don't see the point in
-- Daniel Stenberg -- curl: been grokking URLs since 1998 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2003-09-22
These mail archives are generated by hypermail.
Page updated November 12, 2010.
web site info