Hello Saidus,

Saturday, February 22, 2014, 3:24:57 PM, you wrote:

SB> I'm trying to download a file from httpserver using
SB> curl_easy_send end curl_easy_recv but I miss some thing !!

SB> when I receive a file and store it on the disk I see that the
SB> response header from the server is in the received file !

In general, you shouldn't do this.
These functions deal with raw data, and they do not handle network
protocols for you. Thus you get a data stream with both headers and
body.

To get the body alone (and benefit from libcurl's fine handling of
many tricky parts of the HTTP protocol), you should use a callback
function.

Here is an example of how to do that:
http://curl.haxx.se/libcurl/c/sepheaders.html


-- 
Best regards,
 Tetetest                            mailto:[email protected]

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to