mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Avoid URL validity check for 'Resource'
Which was previously signally an invalid Resource by a default constructed invalid URL. Instead, switch this over to an Optional URL.
This commit is contained in:
parent
8ab541b3f6
commit
733dfdaa05
Notes:
github-actions[bot]
2025-04-19 11:20:02 +00:00
Author: https://github.com/shannonbooth
Commit: 733dfdaa05
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4401
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 22 additions and 21 deletions
|
@ -102,7 +102,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HTTP::HeaderM
|
|||
if (content_type_options.value_or("").equals_ignoring_ascii_case("nosniff"sv)) {
|
||||
m_mime_type = "text/plain";
|
||||
} else {
|
||||
m_mime_type = Core::guess_mime_type_based_on_filename(url().file_path());
|
||||
m_mime_type = Core::guess_mime_type_based_on_filename(url()->file_path());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue