Closed Bug 1139129 Opened 10 years ago Closed 9 years ago

nothing sensible to do in my case with application/octet-stream ("firefox ignores application preferences")

Categories

(Firefox :: Untriaged, defect)

35 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: illumilor.e, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 2015010900 Steps to reproduce: when trying to open a torrent, firefox does nothing for the magnet link or it tries to open with a text editor, even though in the preferences for applications, every entry is set to always ask. I go to: https://kickass.to/mozilla-firefox-6-0-1-beta2-full-win-32-amp-64-bit-reddragon-t5671318.html and click magnet link or the download torrent, but nothing of what firefox does for those is in line with the settings.
The site sends the torrent file with the content-type ""application/octet-stream" and that means that means just "general binary data". You can not save anything for that link and firefox should always ask what to do with that file. The magnet link gives me an error message on windows but on linux you have to register a external protocol handler : http://kb.mozillazine.org/Register_protocol#Firefox_3.5_and_above
So wouldn't it make sense to allow for an octet stream content type entry in app settins so the user can control what happens to that?
No because application/octet-stream means general binary data. It makes only sense to specify an action for specific file types. It would work as expected if the site would for example send the file as " application/x-bittorrent."
"application/octet-stream means general binary data." Exactly, so there could be an option to have firefox ask what to do for general/unknown/binary files. Or to have it save those files. Or to have ff let the OS choose. It would be better behaviour from the users point of view than trying to open every unknown thing it finds with a text editor (I guess the OS is choosing that in my case, but the user won't know that)
QA Whiteboard: [dupeme?]
Summary: firefox ignores application preferences → nothing sensible to do in my case with application/octet-stream ("firefox ignores application preferences")
Since Apache and probably most other servers use application/octet-stream as code for "I don't know what this is, you figure it out", and some sites seem to use it for any download without even trying (e.g. sourceforge.net), it's probably best to not rely on the OS's default assignation for this particular case. (Particularly since in Linux the default application is a text editor, which is never what you want to do with a binary file; and some text editors, like gedit, just choke on binary files.) If something must be done only according to the mime type, it would seem best to only offer the download option (or at least provide no default program to open with). But it would be best to try and guess at the file format first. This would be a guess from the file extension, since it must be made before any of the file is downloaded. From what I see in bug #622455, previous versions of Firefox did this, so that code could be reused.
This report conflates two separate issues. This is the behavior I get in a fresh install of Linux Mint KDE 17.1: 1. Clicking the magnet: link. This pops up the Launch Application prompt, with KTorrent selected. I can select a different application, and have Firefox remember the choice. There's a cosmetic bug here: the listed application is missing its icon. Bug 564867 says if you don't have an application associated with the magnet: protocol on your system, Firefox can't be expected to do anything useful when clicking magnet: links. That doesn't seem right. When encountering an unassociated protocol, Firefox should ask what to do with that link. It's not like you're otherwise forced to use the system default: you can later choose to use a different application, under Preferences -> Applications or in the aforementioned Launch Application prompt. 2. Clicking the .torrent file link The file is downloaded, then it automatically opens in KTorrent. Bug 1040005. If I open up Preferences -> Applications and set .torrent files to “Always ask”, I get the usual prompt about whether to save the file or open it with an application of my choice. However, the “Open with” drop-down menu is very short and completely blank. This shouldn't happen, especially since there's an application associated with that file extension. I can click the drop-down menu to choose KTorrent, or pick a different application. I can't reproduce this under Windows 7. Another thing that might seem strange is that “Do this automatically…” is grayed out. As explained, that's normal since the server sends Content-Type: application/octet-stream. Sometimes, application/octet-stream may be a .torrent, other times a .pdf, or a .zip, or any other file type. Therefore, you can't set it to always open with a particular application. If you find this very bothersome, you can try add-ons like Mason or Force Content-Type to override the MIME type sent by the server. Reporter, are you getting different behavior than the above? If so, * Can you describe it more clearly and maybe provide a screenshot? * What Linux distribution and version are you using? * What bittorrent client do you have installed? Is it properly associated with the magnet: protocol and .torrent files? What happens when you try those two links in a different browser?
Flags: needinfo?(illumilor.e)
Flags: needinfo?(illumilor.e)
Due to the lack of response from the reporter I will mark this as Resolved-Incomplete. Reporter, fell free to reopen it if the issue is still there and you are willing to provide the needed info.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: