WebKitGTK 2.36.0 plus glib2 2.72.0 is unable to fetch file:// URIs (see example in link above). Downgrading to glib2 2.70.4 fixes the issue. I really don't know anything about WebKitGTK so I don't have much more context to offer, but I'm happy to run examples/tests. Maybe this is an upstream bug for glib2 instead?
In bug #230797, Pierre discovered the problem is caused by GLib updating xdg-mime.
There is a GLib bug: https://gitlab.gnome.org/GNOME/glib/-/issues/2639
(In reply to Michael Catanzaro from comment #1)
> There is a GLib bug: https://gitlab.gnome.org/GNOME/glib/-/issues/2639
Moved here. Should be fixed in GLib master.
Although nobody tested the GLib fix. tummychow, if you have time and ability to compile glib, would be helpful if you could check that.
I can confirm that glib commit 05755f2fb fixes the issue for me.
Can confirm the upstream fix also works for me.