cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLINFO_CONTENT_LENGTH_DOWNLOAD ?

From: Kai Zaunick <kai_at_europeonline.net>
Date: Thu, 1 Mar 2001 12:08:21 +0100

Hi,

first of all I would like to thank Daniel for his really nice libcurl interface.
It is easy to use and very powerful , especially with the callback functions.
Currently I came accross a small problem which might be easily resolved:

1. I use the RANGE parameter to download the first 5kb of a file
2. After retrieving the download and computing a MD5 hash I would like to get the total filesize
   of that file.
3. Therefore I thought CURLINFO_CONTENT_LENGTH_DOWNLOAD is the right
    parameter for the curl_get_info. Unfortunately it just returns 5kb and not the total size of the
    file (as transmitted sometimes with the Content-Length in the HTTP header).

My questions:
1. Is there a way to retrieve the total size without downloading the complete file (FTP and HTTP)
    inside libcurl.
2. What is the difference between CURLINFO_CONTENT_LENGTH_DOWNLOAD and
    CURLINFO_SIZE_DOWNLOAD?

Thanks for any suggestions!

Kai.

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-03-01