Hook content-disposition links passed in the header
Some links (namely torrents) aren't reaching our handler code.
TorrentServer Handler in its current form will download these links correctly
through its saveas function (right-click, download with torrentserver), but this
issue should be supported for ease-of-use (1 click downloads).
== explanation ==
=== so whats the problem? ===
in a nutshell: content-disposition
- user clicks on a link
- GET request is sent to server
- server responds with 200 OK, and includes the header:
- content-
- firefox processes the headers, understands it needs to use
"content-
=== why doesn't the handler work? ===
- the handler intercepts user requested urls (clicked or typed in the
url bar), checks if the url matches certain checks, and if it does,
passes the request to mldonkey and stops firefox from handling the
request via nsIConentPolicy
- because firefox is handling "content-
themselves never requests the torrect url, therefore it doesn't
intercept the request
=== how firefox handles mime-types ===
For a full explanation, see:
https:/
https:/
In a nutshell, the process goes like this:
- content type "hints"
- http
- file uris
- unknown decoder
- external helper app service
- helper applications
Content Disposition comes into play right at the end with helper
applications, when it asks the os for a handler of a given mime-type.
It gets the mime-type from the content-disposition header if present.
Once it knows what to do, it loads the uri directly, and uses what ever
handler is present "in the helper application list".
=== how to fix ===
- hook into the mime-type handling, and provide torrentserver-
application/
it onto our existing code to get the url and tell firefox that we
handled it.
Blueprint information
- Status:
- Started
- Approver:
- None
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Alon Swartz
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Beta Available
- Milestone target:
- None
- Started by
- Alon Swartz
- Completed by