cURL / Mailing Lists / curl-library / Single Mail


Re: Process data with a call back before the entire web page has been downloaded.

From: Daniel Stenberg <>
Date: Fri, 14 Dec 2001 10:56:01 +0100 (MET)

On Thu, 13 Dec 2001, David Moffatt wrote:

> I am trying to process a lot of very large web pages and I need to process
> some of the page before the entire page is downloaded. Is there a way to
> get the call back function called before the entire web page is downloaded?

It already does that!

libcurl will download as much as possible when data is readable, into a 50K
receive buffer and then call the callback with that data. There's no other
kind of caching, so it actually can't wait for the page to download before
calling this.

If the download is fast enough, you'll get a very large chunk of data in the
callback. Possibly the whole file at once. But as you can understand, you can
never get more than 50K in one callback (using the current implementation).

> I am using curl 7.9 for Solaris.

Try upgrading to 7.9.2. We've patched away numerous bugs since 7.9.

    Daniel Stenberg -- curl groks URLs --
Received on 2001-12-14