Closed Bug 1209513 Opened 9 years ago Closed 8 years ago

DownloadContentService: Implement resuming downloads

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: sebastian, Assigned: sebastian, Mentored)

References

Details

Attachments

(1 file)

Follow-up from bug 1197720.

The current version of the DownloadContentService discards partially downloaded content on error. Instead we could keep the temporary file and continue downloading using the "Range" header field.

Some things to consider:
* If an item in the catalog is updated (bug 1201059) we want to discard an existing temporary file.
* The server side component needs to support Range headers.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Comment on attachment 8699431 [details]
MozReview Request: Bug 1209513 - DownloadContentService: Add support for resuming downloads. r?rnewman

https://reviewboard.mozilla.org/r/28251/#review25777

Well, that was dramatically simpler than expected.

My main concern here is that if the catalog is wrong, reporting a larger file than we host, we'll try to resume downloading over and over. Think about that for a minute.
Attachment #8699431 - Flags: review?(rnewman) → review+
(In reply to Richard Newman [:rnewman] from comment #2)
> My main concern here is that if the catalog is wrong, reporting a larger
> file than we host, we'll try to resume downloading over and over. Think
> about that for a minute.

That's a good point. However after a successful download (no exceptions etc.) I do not check the file size again and just do a checksum validation. So in the worst case we'd do one unnecessary resume but then continue normally. With the current implementation of failure counters we should avoid running into this too often.

I'll add this as task for the online catalog story: How do we verify the correctness of the catalog and monitor that it remains correct?
https://hg.mozilla.org/integration/fx-team/rev/154b78cbac4a2db1e6a5128bcd30650c5d158d46
Bug 1209513 - DownloadContentService: Add support for resuming downloads. r=rnewman
https://hg.mozilla.org/mozilla-central/rev/154b78cbac4a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Might this make a good release note for 46? Can you suggest wording?
Flags: needinfo?(s.kaspari)
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #6)
> Might this make a good release note for 46? Can you suggest wording?

All this is behind (disabled) flags for now. The only "visible" change for users (bug 1197720) will be a reduced app size but this is probably only going to affect Fx47.
Flags: needinfo?(s.kaspari)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: