cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLINFO_CONTENT_LENGTH_DOWNLOAD bug

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 11 Jul 2007 23:23:24 +0200 (CEST)

On Thu, 28 Jun 2007, Allen Pulsifer wrote:

> Is there any reason in particular that Curl_pgrsSetDownloadSize() is not set
> immediately when the "Content-Length" header is parsed?

The manual says curl_easy_getinfo() should be used _after_ a performed
transfer so then it doesn't matter exactly when the function is called. Which
I guess is the long way to say: no, I can't remember any particular reason.

You're basically relying on an undocumented feature (if the patch is applied).
I'm a bit hesitant to this proposed change just because of this.

But of course, it will allow you to avoid having to scan for and parse that
header yourself...

Do you have any further thoughts on how we should deal with documentation (and
possibly testing) of what info that can be fetched when?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-07-11