cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: http xml response data miss ?

From: Kevin.Liu <kevin.liu_at_innosofts.com>
Date: Thu, 4 Feb 2010 17:27:37 +0800

Hi admin:

   Thank you for you reply .

The write_data() is a callback function, you mean the system will call the
function several times as long as it get the correct value ? but I use
breakpoint and find the function only called one time when it only receive
'1239' not '1246',Is there any other parament I have to set ?

   Thank you very much.

Best regards,
Kevin Liu

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: 2010Äê2ÔÂ4ÈÕ 16:20
To: libcurl development
Subject: Re: http xml response data miss ?

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.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-04