1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:37:45 +00:00

LibWeb: Add rules for distinguishing if a resource is text or binary

Resolves a FIXME in MimeSniff::Resource allowing us to determine
the computed MIME type given supplied types that are used in older
versions of Apache that need special handling.
This commit is contained in:
Kemal Zebari 2023-12-07 21:27:25 -08:00 committed by Andrew Kaster
parent 0b7148e2a6
commit 5d14691149
3 changed files with 102 additions and 13 deletions

View file

@ -42,6 +42,9 @@ private:
void read_the_resource_header(ReadonlyBytes data);
ErrorOr<void> supplied_mime_type_detection_algorithm(StringView scheme, Optional<MimeType> supplied_type);
ErrorOr<void> mime_type_sniffing_algorithm();
ErrorOr<void> rules_for_distinguishing_if_a_resource_is_text_or_binary();
ErrorOr<void> context_specific_sniffing_algorithm(SniffingContext sniffing_context);
ErrorOr<void> rules_for_sniffing_images_specifically();
ErrorOr<void> rules_for_sniffing_audio_or_video_specifically();