After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750275 - application mode opens url using text/html handler instead of x-scheme-handler
application mode opens url using text/html handler instead of x-scheme-handler
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
3.16.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-02 12:22 UTC by kapouer
Modified: 2015-10-07 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
git formatted patch with comment removed (981 bytes, application/mbox)
2015-10-07 08:59 UTC, kapouer
  Details
git formatted patch with comment removed and link to bugzilla (1.01 KB, patch)
2015-10-07 09:01 UTC, kapouer
committed Details | Review

Description kapouer 2015-06-02 12:22:43 UTC
Hi,
if, in Nautilus, i change the association of ".html" files to another application (say gedit)
epiphany 3.16 in application mode opens gedit when i click on a link.
That means it's using the text/html mime type to find which app should open the link.
Instead, epiphany should use the x-scheme-handler/http (or https, ftp, and so on) mime type.
Comment 1 kapouer 2015-10-05 16:09:31 UTC
Proposing a patch, since nautilus 3.18 makes it harder to open a file using an alternate application.

--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -830,7 +830,7 @@
        gdk_app_launch_context_set_timestamp (context, timestamp);

        /* We assume the default application that supports HTML and URIs is the default browser */
-       appinfo = g_app_info_get_default_for_type ("text/html", TRUE);
+       appinfo = g_app_info_get_default_for_type ("x-scheme-handler/http", TRUE);
        uris.data = (gpointer)uri;
        uris.next = uris.prev = NULL;
Comment 2 Michael Catanzaro 2015-10-05 20:17:33 UTC
Thanks for your patch. It seems harmless. Please remove that comment as well, since it's no longer accurate after your change.

I encourage you to follow the steps at https://wiki.gnome.org/Newcomers/SubmittingPatches to submit your patch formally, so you get your name in the commit history and to ensure it doesn't get lost in this bug. But I can commit it for you if you prefer.
Comment 3 kapouer 2015-10-05 20:28:41 UTC
Will do that in a moment. Who knows, i might submit more patches eventually.
Comment 4 kapouer 2015-10-07 08:59:40 UTC
Created attachment 312800 [details]
git formatted patch with comment removed
Comment 5 kapouer 2015-10-07 09:01:59 UTC
Created attachment 312801 [details] [review]
git formatted patch with comment removed and link to bugzilla