cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: receive chunked data from http server via curl_easy_perform( )

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 9 Feb 2004 17:26:06 -0800

On Mon, Feb 09, 2004 at 04:22:38PM -0800, Jerry G. Chiuan wrote:
> >
> > The whole point of chunked data is that it is for those occasions when the
> > server doesn't know the total length of the data (e.g. when it is
> generated
> > dynamically). If the server doesn't know, then you can't know either.
> >
> > >>> Dan
>
> thanks Dan,
> So I can't avoid to renew my buffer and delete my old one since the length
> can't be predicted before I new it for first time
> Once I find my buffer's length is not enough, I have to new another one and
> delete the old one ~~

If you're storing the contents in RAM, yes, that's about the best way. With
a reasonable implementation of realloc, this will still be pretty efficient.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2004-02-10