[Webkit-unassigned] [Bug 230797] [GTK] 2.34: local html file is downloaded instead of displayed. Works ok for webkitgtk-2.32.4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 10 04:40:54 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=230797

--- Comment #1 from Pierre Labastie <pierre.labastie at neuf.fr> ---
I've made some progress on this issue, that is I found how to reproduce it.
It happens if there is a mime directory in $HOME/.local/share, which contains a mime type definition for the html extension. This can be created as follow:

Create the following program (say create-user-html-ext.c):

#include <gio/gio.h>

int main(int argc, char **argv)
{
    GAppInfo *dummy_app_info =
              g_app_info_create_from_commandline ("dummy_app",
                                                  NULL,
                                                  G_APP_INFO_CREATE_NONE,
                                                  NULL);
    g_app_info_set_as_default_for_extension
                               (dummy_app_info,
                                "html",
                                NULL);
}

Compile it:
gcc -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o create-user-html-ext -lgio-2.0 -lgobject-2.0 -lglib-2.0 create-user-html-ext.c

Run it:
./create-user-html-ext

Run MiniBrowser, and enter the file url as in the initial report

Then you should observe the reported behavior: works with 2.32.4, regression in 2.34.0.

Don't forget to (recursively) remove $HOME/.local/share/mime after the test...

Note that any application can use libgio to create those files more or less automatically, so this bug may be triggered without the user knowing (as happened to me: some application that run in January 2020).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211010/3d0fca7c/attachment-0001.htm>


More information about the webkit-unassigned mailing list