cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Adding CURLINFO_CONTENT_LENGTH to curl_getinfo()

From: Bob Schader <bobs_at_product-des.com>
Date: Fri, 02 Feb 2001 10:35:10 -0500
Sure, I guess they could be separate. I was just copying what I found in progress.c
as it related to total_expected_transfer. But if you get only the header of a remote
file, is that considered a download or an upload? Might be easier to remember if
they are called something like CURLINFO_CONTENT_LENGTH_REMOTE
and CURLINFO_CONTENT_LENGTH_LOCAL?

Bob

Daniel Stenberg wrote:
On Fri, 2 Feb 2001, Bob Schader wrote:

Well, if you try it out like I did, at least when only requesting
headers, CURLINFO_SIZE_UPLOAD and CURLINFO_SIZE_DOWNLOAD both return 0.0
because they access data->progress.uploaded and
data->progress.downloaded, but accessing data->progress.size_ul and
data->progress.size_dl instead returns the content-length value of the
file, which is where progress.c gets the total it reports even when no
file was transferred. No overkill there.

You're right of course, I was wrong.

Still, wouldn't you rather have them available separately and not just
together? Like with CURLINFO_CONTENT_LENGTH_DOWNLOAD and
CURLINFO_CONTENT_LENGTH_UPLOAD ?


_______________________________________________ Curl-library mailing list Curl-library@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/curl-library Received on 2001-02-02