cURL / Mailing Lists / curl-users / Single Mail

curl-users

Chunk size in WriteCallback

From: Ajay Tanpure <ajaytanpure92_at_gmail.com>
Date: Thu, 21 Mar 2013 13:16:37 +0530

Hello,
I am using the WriteCallback function to get the response sent by the
server in the memory.
I have used same example as given
http://curl.haxx.se/libcurl/c/getinmemory.html .

My server sends data which contains control character like '\000'.
WriteCallback Function doesn't read these NULL characters and gives wrong
chunk size.

Example: server sends data as : "\037\000\000\000\039\058\061\066"
But chunk size set to 1 only as second byte is '\000' (it should be set to
8).

How should i deal with NULL character in WriteCallback function to allocate
memory?

Thanks

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-21