Open Bug 1462295 Opened 7 years ago Updated 2 years ago

Encoded downloads result in misleading UI

Categories

(Toolkit :: Downloads API, defect, P3)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: jaffathecake, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36 Steps to reproduce: https://gzipped-download-test.glitch.me/ The above is a slow download (1k per second), but the resource is heavily gzipped (from 100mb to ~100k). Actual results: When prompting to save: Plain Text Document (99.6k) During download: "Unknown time left. 22mb of 99.6k" On mobile this will show things like 9999999999% complete. Expected results: When prompting, the size is misleading, as it's showing the content-length, but this is very different to the disk space that will be taken, since the content-length is the gzipped size. This download doesn't need to be "unknown time left", as the browser knows how much it's downloaded and what the content-length is. "22mb of 99.6k" This is "[bytes written] of [content-length]", but due to compression this doesn't make sense. Either miss out the total and replace it with a percentage, or you could try to get the total size by making an additional range request (eg Range: 0-10), as the responding Content-Range header often includes the total unencoded byte size.
Has STR: --- → yes
Component: Untriaged → Downloads API
Product: Firefox → Toolkit
Possibly a dupe of bug 233047.
See Also: → 233047
Setting as P3 until we can confirm that this is a duplicate of bug 233047.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.