mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 04:02:52 +00:00
LibWeb: Make MimeSniff::Resource::sniff() infallible
Everyone was already using this API as if it were infallible anyway.
This commit is contained in:
parent
5c20bc2afc
commit
600cb5ccba
Notes:
github-actions[bot]
2024-10-14 18:48:40 +00:00
Author: https://github.com/awesomekling
Commit: 600cb5ccba
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1796
7 changed files with 103 additions and 106 deletions
|
@ -250,8 +250,7 @@ void HTMLObjectElement::resource_did_load()
|
|||
auto computed_type = MimeSniff::Resource::sniff(resource()->encoded_data(), MimeSniff::SniffingConfiguration {
|
||||
.sniffing_context = MimeSniff::SniffingContext::TextOrBinary,
|
||||
.supplied_type = move(supplied_type),
|
||||
})
|
||||
.release_value_but_fixme_should_propagate_errors();
|
||||
});
|
||||
if (computed_type.essence() != "text/plain"sv)
|
||||
binary = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue