MIME associations do not work with Chromium (or Google Chrome)
Reported by
tcall...@redhat.com,
Jun 14 2017
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Example URL: http://cdimage.debian.org/debian-cd/current/amd64/bt-cd/ Steps to reproduce the problem: 1. Have a torrent client with a mime-type registered for application/x-bittorrent 2. Double-check by running: xdg-mime query default application/x-bittorrent (on my Fedora 26, this returns "deluge.desktop") 3. Triple-check by running xdg-open on the downloaded file: xdg-open ~/Downloads/debian-8.8.0-amd64-CD-1.iso.torrent What is the expected behavior? Chromium launches the app from the .desktop file with the MimeType default for application/x-bittorrent via xdg-open. What went wrong? It just downloads the file instead. Google Chrome (same version) exhibits the same behavior. Did this work before? N/A Chrome version: 59.0.3071.86 Channel: n/a OS Version: Fedora 26 Flash Version: This was filed against Chromium 55 (and Fedora 25) back in January 2017. https://bugzilla.redhat.com/show_bug.cgi?id=1417374 I'm not sure how long it has been broken.
,
Jun 14 2017
PlzNavigate is not on 59 stable, has only been on Canary and Dev. Adding asanka@ for downloads behavior, in case there have been changes in that area that could be affecting the behavior.
,
Jun 14 2017
Indeed it's not, but the non-PlzNavigate path was significantly changed while preparing to get PlzNavigate out the door.
,
Jun 14 2017
Indeed it was changed. M55 is quite a while ago, so let's add Needs-Bisect and see if we can find when approximately it changed. I won't be able to do it in the next week or two, help is appreciated.
,
Jun 14 2017
Also, adding clamy@ explicitly.
,
Jun 15 2017
Is this a regression? The default action for any top level navigation that doesn't result in a response with a content type not understood by the renderer is to download it. It sounds like the behavior is WAI?
,
Jun 15 2017
Asanka: This is about the case where the mime type is recognized by the underlying OS, in which case we should (I assume) be passing the file (URL?) to the registered OS-level handler for that mime type.
,
Jun 15 2017
#7: Invoking the underlying OS to open a file happens after the file is downloaded and only if there's an explicit user request to open the file or if the user has configured the file type to be opened automatically. On Linux, files are opened via 'xdg-open' which should work correctly as long as the filename has a recognized extension. In the general case, the browser doesn't -- and shouldn't -- invoke xdg-open on a response even if there's a registered handler for its MIME type. At least not without explicit configuration and user consent. Or am I misunderstanding the issue? :-)
,
Jun 15 2017
This isn't an external protocol handler thing, as that is about handling links with different schemes like magnet:. These are regular downloads with a mime type. Did this ever work in the way requestd? I don't think Chrome ever opens downloaded files that have handlers for their mime types, it just downloads them. You can then double click the downloaded file if you want.
,
Jun 15 2017
You're right. I had been thinking this was the magic scheme case, not the launch-based-on-mime type case. Which would make this a pure downloads issue, not a navigation one, and working as intended, unless trying to run the file from Chrome doesn't run xdg-open.
,
Jun 15 2017
OP: Does Chrome behave the way you want if you set .torrent as a file type that always opens? You can do so by downloading a .torrent file, and picking "Always open files of this type" from the download shelf context menu. If the resulting behavior is what you are looking for, then this is all WAI. I don't think Chromium should have a special case for .torrent file. Though this shouldn't prevent a distribution from pre-populating the "download.extensions_to_open" preference so long as the security trade-off has been considered. That said, I'll defer to the current downloads owners.
,
Jun 15 2017
,
Jun 15 2017
It does behave as expected. I was under the impression that the default was for files to be opened. Thanks for the quick investigation and resolution.
,
Jun 15 2017
Thanks for the followup! Going to go ahead and close this.
,
Sep 21 2017
How about open Telegram (https://telegram.org/) mime association: tg://resolve?domain=spbmetro xdg-open tg://resolve?domain=spbmetro - worked Chromium 60.0.3112.113 (Developer Build) Ubuntu 17.04 (64-bit) didn't open that uri tg://resolve?domain=spbmetro And some many more other association not working. Although everything worked before. Broken after upgrade to version 58. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by mmenke@chromium.org
, Jun 14 2017Components: UI>Browser>Navigation