cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

How to detect end of headers?

From: James Cheng <jcheng_at_tivo.com>
Date: Thu, 19 Feb 2009 11:49:54 -0800

Hi!

I'm using the libcurl easy interface. My application needs to detect when headers are finished being sent and take some action before the body starts processing. What is the recommended way to do this?

I am currently detecting it by using the HEADERFUNCTION callback, and looking for a header that is "\r\n", which I'm guessing will be the final terminating header. Assuming that the server is sending it properly, does libcurl send it along?

My other thought was to have my code run within the WRITEFUNCTION callback, but if the response has Content-Length:0, then it looks like the body callback is never called.

Thanks,
-James
Received on 2009-02-19

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET