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, 2 Feb 2001 14:08:07 -0500

I realize now why I failed trying to use a double for CURLINFO_CONTENT_LENGTH
in my own code: I had it defined in the enum as CURLINFO_LONG +15 instead of
CURLINFO_DOUBLE +15!
  ----- Original Message -----
  From: Bob Schader
  To: curl-library_at_lists.sourceforge.net
  Sent: Friday, February 02, 2001 10:35 AM
  Subject: Re: Adding CURLINFO_CONTENT_LENGTH to curl_getinfo()

  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 requestingheaders, CURLINFO_SIZE_UPLOAD and CURLINFO_SIZE_DOWNLOAD both return 0.0because they access data->progress.uploaded anddata->progress.downloaded, but accessing data->progress.size_ul anddata->progress.size_dl instead returns the content-length value of thefile, which is where progress.c gets the total it reports even when nofile was transferred. No overkill there.
You're right of course, I was wrong.Still, wouldn't you rather have them available separately and not justtogether? Like with CURLINFO_CONTENT_LENGTH_DOWNLOAD andCURLINFO_CONTENT_LENGTH_UPLOAD ?

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