Bug 210901 - [GTK] Pass file:// URIs through WebKitWebPage::send-request signal
Summary: [GTK] Pass file:// URIs through WebKitWebPage::send-request signal
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-23 00:39 PDT by Milan Crha
Modified: 2020-04-23 00:39 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2020-04-23 00:39:14 PDT
It would be nice to not have special-cased file:// URIs in the WebKit and always process them through the WebKitWebPage::send-request signal, the same as http://, https:// and other URIs are done that way. It will help the extensions to "redirect" the request to an appropriate place, if needed.

Currently, the file:// URIs are simply rejected by WebKit with a comment of "not allowed to load local content" (I'm only paraphrasing). While it's nice WebKit can handle file:// URIs on its own, I do not see a reason for the special processing of those. It can ask the WebKitWebPage::send-request first and only then decide what to do, the same as is done with http(s):// URIs.

This might probably need a counter part change on the UI side, to be able to process file:// URIs with webkit_web_context_register_uri_scheme(), but I only guess that. I do not know how this works in the background.