mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb/MimeSniff: Add non-standard text or binary context sniffing
This is used in cases where the spec expects us to only run the "rules for distinguishing if a resource is a text or binary" algo.
This commit is contained in:
parent
8a974ca91a
commit
8e5410347b
Notes:
sideshowbarker
2024-07-18 00:54:03 +09:00
Author: https://github.com/kemzeb
Commit: 8e5410347b
Pull-request: https://github.com/SerenityOS/serenity/pull/23043
Reviewed-by: https://github.com/trflynn89
3 changed files with 16 additions and 0 deletions
|
@ -680,6 +680,8 @@ ErrorOr<void> Resource::context_specific_sniffing_algorithm(SniffingContext snif
|
|||
return rules_for_sniffing_audio_or_video_specifically();
|
||||
if (sniffing_context == SniffingContext::Font)
|
||||
return rules_for_sniffing_fonts_specifically();
|
||||
if (sniffing_context == SniffingContext::TextOrBinary)
|
||||
return rules_for_distinguishing_if_a_resource_is_text_or_binary();
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue