curl-library
Re: http xml response data miss ?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 4 Feb 2010 09:19:33 +0100 (CET)
Date: Thu, 4 Feb 2010 09:19:33 +0100 (CET)
On Wed, 3 Feb 2010, Kevin.Liu wrote:
> I post a http request to server used libcurl and the server will response
> me a xml message . I set the recv_function like this:
> And I can receive the xml data in the funciton write_data,but I found that
> the data length is shorter than the real receive .
>
> The server send me a xml data with length '1246' ,but I only receive '1239'
> ( size*nmemb )in the write_data (ptr). I am new to libcurl so I really hope
> that someone could help me out of the problem.
libcurl calls the function several times as long as you just return the
correct value, and then the sum of all calls should be the total body size.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-02-04