curl-library
To get correct Content Length in headers
Date: Sat, 16 Mar 2013 18:04:57 +0530
Hello,
I am using libcurl to send http post request to http server.
I get the data from another process, Its size is variable every time.
I add that data in POSTFIELD of the request in curl_easy_setopt() function.
My data contains character '\000' so i get the different content length in
header causing problem on server side.
Ex. data: buf[4];
buf = "\037\000\000\000"
Now the when i read data from process it gives content length as 4, and in
header i got it as 1.
How to deal with this NULL character?
Changing each character by increasing ASCII value is one way but it is not
efficient as i need to change and again retrieve original
byte for all my data (may be in GBs).
Thanks
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-16