cURL / Mailing Lists / curl-library / Single Mail


Re: using curl_easy_recv function to retrieve data from http server without header!!

From: Tetetest <>
Date: Sat, 22 Feb 2014 15:55:25 +0400

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

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

Here is an example of how to do that:

Best regards,
List admin:
Received on 2014-02-22