cURL / Mailing Lists / curl-library / Single Mail


Re: question about curl_multi_perform, callbacks, and presenting a pull interface

From: Daniel Stenberg <>
Date: Fri, 24 Aug 2012 00:15:33 +0200 (CEST)

On Thu, 23 Aug 2012, Rich Bramante wrote:

> I had considered this approach but was fearful that in the case where
> the server was returning a large amount of data quickly, curl would be
> in a constant read-callback loop and and my library would not be able
> to return control back out to the caller to start draining the data
> possibly causing my library to buffer the entire response in memory.
> Since the client can download an arbitrarily large amount of data I
> did not pursue this.

Right, but libcurl will not "read everything that comes until there's nothing
more to read" so it should be a finite number of bytes.

I would say the biggest problem is if you use automatic decompression of data
as then it can probably become a significant amount if a very easy
compressible data stream is sent.

List admin:
Received on 2012-08-24