Closed Bug 918188 Opened 11 years ago Closed 7 years ago

JS Downloads API has no access to the underlying request nsIChannel

Categories

(Toolkit :: Downloads API, defect)

26 Branch
defect
Not set
normal
Points:
8

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sparky, Unassigned)

References

(Blocks 2 open bugs)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release) Build ID: 20130918030202 Steps to reproduce: PDMTS [1] uses the download's nsIChannel to get the advertised modification time from the server, but this doesn't appear to be exposed through any API in the new Downloads implementation [2]. This is similar to Bug 915036, in that it needs access to the nsIChannel. However, this only needs read-only access to the nsIChannel after the download has started, so I assume this would be a simpler accommodation in the API (i.e. make it accessible through Download.saver.channel). It's also worth noting that the nsIChannel needs to be held onto until the download is terminated (successful or not) and the related events have finished processing. Otherwise, downloads could lose the nsIChannel before events get triggered (Bug 595785). [1] https://addons.mozilla.org/en-US/firefox/addon/preserve-download-modification/ [2] https://groups.google.com/d/msg/mozilla.dev.extensions/ltOB3MzVwcI/1Cf2x9mMBuwJ
Blocks: jsdownloads
Component: Untriaged → Extension Compatibility
OS: Linux → All
Hardware: x86_64 → All
Component: Extension Compatibility → Download Manager
Product: Firefox → Toolkit
Status: UNCONFIRMED → NEW
Ever confirmed: true
We definitely need a way for add-ons to register hooks into the API, to provide this type of functionality. The DownloadSaver objects could do global DownloadIntegration calls, or we could let add-ons extend existing DownloadSaver types, see bug 899013 and bug 841348.
Depends on: 899013, 841348
Blocks: 733954
Blocks: 907764
Whiteboard: p=0
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Whiteboard: p=0 → p=8
Points: --- → 8
Whiteboard: p=8
Closing the old compatibility bug now that legacy extensions are not supported anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.