cURL / Mailing Lists / curl-users / Single Mail


Re: bug/feature in progress?

From: Daniel Stenberg <>
Date: Wed, 21 May 2003 11:15:38 +0200 (CEST)

On Mon, 19 May 2003, David Byron wrote:

> I've been using curl for all of 3 days, so I hope I'm using the right list
> and asking appropriate questions.

It is and you're welcome!

> When I execute the download command again, both the % total and % received
> numbers start back from 0 again, even though the file is partially there.
> The total number of bytes seems to start at a non-zero number, but that one
> seems too big....Anyway, I'm more concerned about the percentage for now.

As your other mail pointed out, this progress meter shows the amount to be
downloaded. It does not show the amount that is already downloaded and
therefore doesn't have to be downloaded.

> I see the same kind of 'start-at-0' behavior when using --progress-bar.
> My end goal has me writing my own progress function that sends the info to
> a remote site, so I want to make sure the info passed to the progress
> function is correct.
> I'll try this with 7.10.5 in the meantime, but the release notes don't make
> it sound like anything like this has changed.

Nah, 7.10.5 is identical in this aspect.

I think the only "problem" that prevents you from simply adding the original
size to one of the counters above is that there's this optional progress
callback function that applications (users of libcurl) can use, and that is
defined to get the expected download/upload sizes, not the size of the
complete file. This progress callback is what curl uses to make the
progress-bar output...

My plan has also been to make the regular progress meter use this callback
too, and thus move it out from the library into the client code.

 Daniel Stenberg -- curl: been grokking URLs since 1998
This email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software.
Received on 2003-05-21