mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Make more MimeSniff::MimeType APIs infallible
This commit is contained in:
parent
9a8db40a23
commit
88e7688940
Notes:
github-actions[bot]
2024-10-14 18:48:50 +00:00
Author: https://github.com/awesomekling
Commit: 88e7688940
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1796
14 changed files with 55 additions and 56 deletions
|
@ -102,7 +102,7 @@ ErrorOr<DataURL> process_data_url(URL::URL const& data_url)
|
|||
// 14. If mimeTypeRecord is failure, then set mimeTypeRecord to text/plain;charset=US-ASCII.
|
||||
if (!mime_type_record.has_value()) {
|
||||
mime_type_record = MimeSniff::MimeType::create("text"_string, "plain"_string);
|
||||
TRY(mime_type_record->set_parameter("charset"_string, "US-ASCII"_string));
|
||||
mime_type_record->set_parameter("charset"_string, "US-ASCII"_string);
|
||||
}
|
||||
|
||||
// 15. Return a new data: URL struct whose MIME type is mimeTypeRecord and body is body.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue