Closed
Bug 931477
Opened 11 years ago
Closed 11 years ago
Firefox erroneously reports 0byte downloads when download size is not known initially
Categories
(Firefox :: Downloads Panel, defect)
Tracking
()
RESOLVED
FIXED
Firefox 28
People
(Reporter: merike, Assigned: Paolo)
References
Details
(Keywords: regression)
Attachments
(2 files)
(deleted),
patch
|
mak
:
review+
lsblakk
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Whenever I download backups in gz format from cpanel Firefox reports the download size as 0. It is not zero, but I believe the server doesn't specify filesize initially, so Firefox can only know it after the download has completed. It used to be the case that after the download has finished bot download panel and library showed size correctly. Now both get it wrong right after it has finished downloading.
Works in 25.0 20131025150754
Broken in 26.0a2 20131027004004
Keywords: regression
Comment 1•11 years ago
|
||
I'd also seen this a few days ago and remarked to Mike
Assignee | ||
Comment 2•11 years ago
|
||
There are two parts to this issue, that is showing that we don't know the final size while downloading, and getting the exact final file size of the download from disk instead of the amount of data transferred from the network.
I think the first is the most important regression and can be addressed now, while I've filed bug 941063 for the second.
Blocks: 941063
status-firefox25:
--- → unaffected
status-firefox26:
--- → affected
status-firefox27:
--- → affected
status-firefox28:
--- → affected
tracking-firefox26:
--- → ?
tracking-firefox27:
--- → ?
Assignee | ||
Comment 3•11 years ago
|
||
This simple patch fixes the major file size issue, though the displayed size may still be inaccurate for finished downloads. It is as self-contained as possible, so that it can be considered for fixing the regression in Beta.
Steps to reproduce:
- Copy the URL of a file for which the server does not specify the size, for example: https://tbpl.mozilla.org/php/getParsedLog.php?id=30834886&tree=Mozilla-Central&full=1
- Open the Downloads Panel and paste the URL with CTRL-V.
Expected results:
- While downloading, you should not see a total size of 0 bytes.
- When completed, you should see a valid file size (though it may be less than the final size on disk when the file is compressed).
Actual results before the patch is applied:
- While downloading and on completion, you see a total size of 0 bytes.
This patch touches the code that provide data about the current progress of the download. As a regression test, you can execute a download with a known final file size and check that progress is shown as expected.
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Attachment #8335383 -
Flags: review?(enndeakin)
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8335383 [details] [diff] [review]
The patch
I'm told Neil is away, do you think you can review this patch potentially
tracking Beta on short notice, Marco?
Attachment #8335383 -
Flags: review?(enndeakin) → review?(mak77)
Comment 5•11 years ago
|
||
Tracking this regression but would like to know the risk/reward of taking this patch vs. considering a backout if the regression cause is known.
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to lsblakk@mozilla.com [:lsblakk] from comment #5)
> Tracking this regression but would like to know the risk/reward of taking
> this patch vs. considering a backout if the regression cause is known.
This patch fixes code that uses the Downloads API that will be shipped in Firefox 26, so the choice here is between taking the patch on Aurora and Beta or leaving the regression in place.
Any risk caused by this patch is limited to the progress indication of downloads.
I think we should add a manual test case based on comment 3 to check for potential regressions.
Flags: needinfo?(paolo.mozmail)
Comment 7•11 years ago
|
||
Comment on attachment 8335383 [details] [diff] [review]
The patch
Review of attachment 8335383 [details] [diff] [review]:
-----------------------------------------------------------------
I think it's a good stop-gap solution for branches, while waiting for bug 941063
::: browser/components/downloads/src/DownloadsCommon.jsm
@@ +893,5 @@
> + this._download.currentBytes;
> + this.percentComplete = 100;
> + } else if (this._download.hasProgress) {
> + // If the final size and progress are known, use them.
> + this.maxBytes = this._download.totalBytes;
trailing spaces
Attachment #8335383 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
Comment on attachment 8335383 [details] [diff] [review]
The patch
Note: I'm nominating this before it has landed on mozilla-central since I'll be away next week, the patch should be safe to land on Aurora and Beta after Nightly testing.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): 825588
User impact if declined: Incorrect progress indication for downloads with no size
Testing completed (on m-c, etc.): Tested locally, should be tested in Nightly when patch lands there
Risk to taking this patch (and alternatives if risky): Any risk caused by this patch is limited to the progress indication of downloads. I think we should add a manual test case based on comment 3 to check for potential regressions. The patch is self-contained and can be easily backed out in case any issue occurs.
String or IDL/UUID changes made by this patch: None
Attachment #8335383 -
Flags: approval-mozilla-beta?
Attachment #8335383 -
Flags: approval-mozilla-aurora?
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Updated•11 years ago
|
Attachment #8335383 -
Flags: approval-mozilla-beta?
Attachment #8335383 -
Flags: approval-mozilla-beta+
Attachment #8335383 -
Flags: approval-mozilla-aurora?
Attachment #8335383 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 11•11 years ago
|
||
Comment 12•11 years ago
|
||
Comment 13•11 years ago
|
||
Updated•11 years ago
|
status-b2g-v1.2:
--- → fixed
Comment 14•11 years ago
|
||
Verified this bug on FF 26.08 using the following environments:
Ubuntu 12.04 x32
Windows 7 x64
The download size is different from 0 but the difference between the size displayed by the download panel and the size of the file on the disk is huge.( eg size on the disk 22 Mb download size displayed by the panel 660 kb). I will log a new bug for this issue.
Comment 15•11 years ago
|
||
Verified this bug on FF 27.0a2 build id:20131128004001 using the following environments:
Ubuntu 12.04 x32
Windows 7 x64
The download size is different from 0 but the difference between the size displayed by the download panel and the size of the file on the disk is huge.( eg size on the disk 22 Mb download size displayed by the panel 660 kb). I will log a new bug for this issue.
Comment 16•11 years ago
|
||
Verified this bug on FF 28 build id:20131217004003 using the following environments:
Ubuntu 12.04 x32
Windows xp x86
Os X 10.9
The download size is different from 0 but the difference between the size displayed by the download panel and the size of the file on the disk is huge.( eg size on the disk 22 Mb download size displayed by the panel 660 kb). I will log a new bug for this issue.
You need to log in
before you can comment on or make changes to this bug.
Description
•