cURL / Mailing Lists / curl-library / Single Mail

curl-library

how can i recognize http head or body?

From: huancong deng <denghuancong_at_gmail.com>
Date: Thu, 8 Nov 2012 21:14:16 +0800

the code is here:
-------------------------------
curl_easy_setopt(curl, CURLOPT_URL,"
http://ucenter.local.ucloud.cn/api/aiotest/test");
curl_easy_setopt(curl, CURLOPT_READDATA, fd);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
curl_easy_setopt(curl,
CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
curl_easy_setopt(curl, CURLOPT_HEADER,1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &common_http_write_cb);
===================================================

it return two http head, one is 100, the other is 200, how can
i distinguish which is head and which is body ? is there any api or option
can tell me "you are getting the head " in my writefunction
"ommon_http_write_cb" ?

thanks a lot, :)

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-11-08