[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive
From: |
Josef Möllers |
Subject: |
Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339) |
Date: |
Thu, 16 Aug 2018 10:20:11 +0000 |
Sorry for the somewhat long delay ... I had slightly more urgent tasks to
attend to.
My analysis so far is that the bar's reference is set to one of the files' size
(the first?), but the update (progress) value used is from whatever is
currently updated. If these happen to be identical files or the file sizes
happen to be identical, then the total is 100%. If, however, the reference is
set from a very small file (eg to 8 from some .Po file), and later the progress
of a file of different size is displayed, then the percentage is off.
Does this make sense?
My proposal is to amend "struct _body_callback_context" with an additional
field "uint64_t file_size" and set this in _get_header().
Then, in _get_body(), pass this value to bar_set_downloaded() and further down
the chain such that when _bar_update_slot() calculates the percentage, the
reference is correct.
I'm currently implementing this.
As an alternative, the size of a file to download should be added to
slotp->file_size and the number of bytes received in a DATA packet should be
added to slotp->bytes_downloaded, such that, in the end, the sum of all file
sizes is the reference and the sum of all DATA packets is the measurement
value. This would mean that the percentage would drop whenever a new file's
HEAD is received and is added to slotp->file_size. In the end, the two sums
should be equal and the percentage would be 100.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/issues/339#note_94868348
You're receiving this email because of your account on gitlab.com.
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339),
Josef Möllers <=
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Josef Möllers, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Tim Rühsen, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Darshit Shah, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Josef Möllers, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Darshit Shah, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Josef Möllers, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Josef Möllers, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Darshit Shah, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Josef Möllers, 2018/08/16
- Re: [Wget-dev] wget2 | Progress reports >100% file size during recursive downloads with HTTP/2 (#339), Josef Möllers, 2018/08/16