Closed Bug 946170 Opened 11 years ago Closed 11 years ago

[Download API] Resuming a download is not working.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME
1.3 C2/1.4 S2(17jan)

People

(Reporter: borjasalguero, Assigned: aus)

Details

(Whiteboard: [systemsfe][p=3])

When the server does not offer the option of 'resuming', the API should 'restart' the download automatically or deliver an error, and exposing a 'restart' method.
Depends on: 938023
Fabrice, when testing the API I've discovered this issue, could you take a look? Thanks!!
Flags: needinfo?(fabrice)
Whiteboard: [systemsfe]
No longer depends on: 938023
Component: Gaia → General
Please cc Aus to any download bugs, as he's taking over the platform part.
Flags: needinfo?(fabrice) → needinfo?(aus)
Hi Aus, When testing I've realized that this feature is broken, and we would need to have at least the basic functionality ready within our 1.3 goal. Could you help us on this? Thanks!
Yep, I'll take a look. The tests should have caught this...
Assignee: nobody → aus
Flags: needinfo?(aus)
Status: NEW → ASSIGNED
Whiteboard: [systemsfe] → [systemsfe][p=3]
Flags: needinfo?(borja.bugzilla)
Borja, could you re-test this please? This functions as expected for me. I've re-written the test for resuming and it passes as expected and the download does resume. One key thing to remember is that the Promise returned when calling resume() will only get called when the resumed download FINISHES. There is a status change event though that will show the download going from stopped to downloading. I'll be landing the new tests as part of this bug to ensure that everything keeps on working. If this does not work for you, please let me know how you are testing it. Resuming typically requires http 1.1 and support for range requests. If those aren't available, resuming will fail and you'll need to restart the download yourself by finalizing the failed download object and creating a new one.
This seems to be working now. Marking as WORKSFORME. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(borja.bugzilla)
Resolution: --- → WORKSFORME
Target Milestone: --- → 1.3 C2/1.4 S2(17jan)
No longer blocks: fxos-download-mgr, 938023
You need to log in before you can comment on or make changes to this bug.