cURL / Mailing Lists / curl-library / Single Mail


Re: buffer gets lost

From: Dan Fandrich <>
Date: Fri, 13 Jan 2012 01:42:43 -0800

On Fri, Jan 13, 2012 at 07:16:29AM -0200, Marco wrote:
> I'm having trouble with the page content retrieved when I use
> "curl_easy_perform(curl);", basically, every time I try to get a page
> from a localhost, everything goes right, don't matter how big the
> page is.
> But when I try in any remove server, even google, only the very-end
> of page (at about 100 bytes) is returned to the buffer variable.

That's because the write callback is called many time, each time with
another small piece of data. Take a look at the getinmemory.c example
program to see how to properly download a URL into a memory buffer.

>>> Dan
List admin:
Received on 2012-01-13