cURL / Mailing Lists / curl-library / Single Mail


no content-length given in response header

From: Mike Tilburg <>
Date: Tue, 27 Mar 2007 13:31:52 -0700



I've run into a situation where the response header doesn't give me a
content-length, but it has a content-type and sends me data.


For example, I am using easy curl and have set up the option
CURLOPT_WRITEFUNCTION which then calls back into a function I called
http_data. When curl is done receiving data, it simply stops calling
http_data, however I need to know when this happens. Normally I would
keep track of the bytes read and compare them to the content-length
field in the response header, but if the content-length field is
missing, I have no way of knowing when curl is done calling http_data.


Does curl have a callback or something that will alert me when the
request has been completed?





Received on 2007-03-27