cURL / Mailing Lists / curl-library / Single Mail


Re: How to detect end of headers?

From: Daniel Stenberg <>
Date: Fri, 20 Feb 2009 10:54:02 +0100 (CET)

On Thu, 19 Feb 2009, Jamie Lokier wrote:

>> 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.
> If the response has Content-Length:0 then the whole request finishes when
> the headers are done; you can easily detect that :-)

I would even encourage that approach since that way you don't have to parse
any headers at all...

Received on 2009-02-20