cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem 1024 bytes

From: Gregorio Pellegrino <mail_at_gregoriopellegrino.com>
Date: Thu, 20 May 2010 22:13:03 +0200

Ok thanks!

On 20 May 2010 14:32, Linus Nielsen Feltzing <linus_at_haxx.se> wrote:

> On 2010-05-20 12:08, Gregorio Pellegrino wrote:
>
>> I'm trying to download data into a chunk of memory following this
>> (http://curl.haxx.se/libcurl/c/getinmemory.html) example.
>>
>> The problem is that /size * nmemb/ (in /WriteMemoryCallback/) returns
>> always 1024, but the page is bigger than 1024 bytes.
>>
>> Can you help me?
>>
>
> The callback will be called repeatedly until the entire page is received.
> The callback function reallocates the buffer and adds each 1024-byte chunk
> to the buffer. When curl_easy_perform() returns, the entire page will be
> stored in the buffer pointed to by chunk.memory, just as the comment says
> after the call to curl_easy_cleanup().
>
> Linus
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-20