GNOME Bugzilla – Bug 544033
Downloaded files extensions don’t always match the MIME type
Last modified: 2018-08-03 19:22:51 UTC
When saving a file (especially a web page) or downloading it, it is saved with the same name than on site. However the resulting extension does not always correspond to the MIME type. After which nautilus raises valid concerns about a mismatch between the filename and its contents. It would be nice if epiphany could check whether the filename corresponds to the valid patterns for the MIME type in the MIME database, and add a correct extension to the proposed name when this is not the case.
That's not a bad idea, but what should be the behaviour when auto download & open is enabled? Still offer a dialog?
At least for HTML pages, maybe it could simply append ".html" to the filename. As for doing it for all MIME types, this may cause trouble when the HTTP server gives a wrong type, which is not so uncommon. Furthermore, I don’t think gio has an API to obtain a file extension for a given MIME type.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/126.