cURL / Mailing Lists / curl-users / Single Mail

curl-users

Content-Length

From: Raphael Summers <raphael.summers_at_theseed.net>
Date: Thu, 22 Aug 2002 18:57:54 +0100

Hi there,

I am trying to identify the size of an http file before I download it. I
have read elsewhere on the mailing list that this is possible with the use
of CURLOPT_HEADER and CURLOPT_NOBODY.

I have actually managed to successfully download the headers (although it
seems I can only do this if I download the body as well.) It appears that
not all websites contain that particular header though. I have discovered
subsequently that it is in fact required by the protocol. I am therefore led
to believe that I am doing something wrong.

Is there a way of ensuring that the Content-Length header is always
downloaded? If not, can you suggest another way of identifying the size of
the file without the need to download it first.

Thanks in advance,

Raphael Summers.

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-08-22