mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibWeb: Ignore preconnect requests for file: and data: URLs
I noticed while debugging a fully downloaded page that it was trying to preconnect to a file:// host. That doesn't make any sense, so let's add a tiny bit of logic to ignore preconnect requests for file: and data: URLs.
This commit is contained in:
parent
ac6b3c989d
commit
bf5ad56085
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ void ResourceLoader::prefetch_dns(AK::URL const& url)
|
|||
|
||||
void ResourceLoader::preconnect(AK::URL const& url)
|
||||
{
|
||||
if (url.scheme().is_one_of("file"sv, "data"sv))
|
||||
return;
|
||||
|
||||
if (ContentFilter::the().is_filtered(url)) {
|
||||
dbgln("ResourceLoader: Refusing to pre-connect to '{}': \033[31;1mURL was filtered\033[0m", url);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue