mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
LibWeb/MimeSniff: Add match an archive type pattern algorithm
This commit is contained in:
parent
d5e5a1138f
commit
f6d3ea33fa
2 changed files with 35 additions and 1 deletions
|
@ -76,6 +76,9 @@ TEST_CASE(compute_unknown_mime_type)
|
|||
mime_type_to_headers_map.set("audio/midi"sv, { "MThd\x00\x00\x00\x06"sv });
|
||||
mime_type_to_headers_map.set("video/avi"sv, { "RIFF\x00\x00\x00\x00\x41\x56\x49\x20"sv });
|
||||
mime_type_to_headers_map.set("audio/wave"sv, { "RIFF\x00\x00\x00\x00WAVE"sv });
|
||||
mime_type_to_headers_map.set("application/x-gzip"sv, { "\x1F\x8B\x08"sv });
|
||||
mime_type_to_headers_map.set("application/zip"sv, { "PK\x03\x04"sv });
|
||||
mime_type_to_headers_map.set("application/x-rar-compressed"sv, { "Rar\x20\x1A\x07\x00"sv });
|
||||
|
||||
for (auto const& mime_type_to_headers : mime_type_to_headers_map) {
|
||||
auto mime_type = mime_type_to_headers.key;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue