cURL
Your ad here would be seen by 100,000 unique vistors every month Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

SourceForge.net Logo

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

How to detect missing Content-Length response header?

From: James Cheng <jcheng_at_tivo.com>
Date: Thu, 19 Feb 2009 12:06:06 -0800

Hi!

I'm using curl_easy_getinfo() with CURLINFO_CONTENT_LENGTH_DOWNLOAD in order to get the value of Content-Length. If the Content-Length header was not present in the response headers at all, curl still returns "0" with curl_easy_getinfo() returning CURLE_OK. That means there's no built-in way to detect Content-Length actually being 0, vs the Content-Length header not being sent.

Is there some other mechanism? If not, it looks like I'll have to check for the headers as they come in, using the HEADERFUNCTION callback.

Thanks,
-James
Received on 2009-02-19

These mail archives are generated by hypermail.

donate! Page updated October 05, 2008.
web site info

.NET component for file upload with ASP.NET