Andreas Kling
600cb5ccba
LibWeb: Make MimeSniff::Resource::sniff() infallible
...
Everyone was already using this API as if it were infallible anyway.
2024-10-14 20:47:35 +02:00
Andreas Kling
5c20bc2afc
LibWeb: Make MimeSniff::MimeType::parse() infallible
...
It already returns an empty Optional for failures, so there's no need to
wrap it in an ErrorOr as well.
2024-10-14 20:47:35 +02:00
Andreas Kling
88e7688940
LibWeb: Make more MimeSniff::MimeType APIs infallible
2024-10-14 20:47:35 +02:00
Andreas Kling
9a8db40a23
LibWeb: Make MimeSniff::MimeType::create() infallible
2024-10-14 20:47:35 +02:00
Kemal Zebari
b8a5e18a01
LibWeb/MimeSniff: Update the MIME type sniffing algo to meet specs
...
The spec moved/added the xml and html checks to the beginning and
removed sniffing resource feeds.
2024-10-02 16:15:23 -04:00
Jamie Mansfield
08a3904309
LibWeb/MimeSniff: Implement "minimize a supported MIME type"
...
See:
- 227a469
2024-05-19 16:25:50 +02:00
Kemal Zebari
8e5410347b
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.
2024-02-02 14:34:17 -05:00
Kemal Zebari
3aaa1c1df7
LibWeb/MimeSniff: Implement MP4 signature matching
2024-01-12 17:12:47 -07:00
Kemal Zebari
5d14691149
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.
2024-01-04 12:25:38 -07:00
Kemal Zebari
0b7148e2a6
LibWeb/MimeSniff: Add sniffing in a font context
2024-01-04 12:25:38 -07:00
Kemal Zebari
3a820ddbdf
LibWeb/MimeSniff: Add sniffing in an audio or video context
2023-12-07 10:31:54 -07:00
Kemal Zebari
02ea85da2c
LibWeb/MimeSniff: Add sniffing in an image context
2023-12-07 10:31:54 -07:00
Kemal Zebari
ea15501f37
LibWeb/MimeSniff: Add sniffing in a browsing context
2023-12-07 10:31:54 -07:00
Kemal Zebari
f6d3ea33fa
LibWeb/MimeSniff: Add match an archive type pattern algorithm
2023-12-07 10:31:54 -07:00
Kemal Zebari
d5e5a1138f
LibWeb/MimeSniff: Add match an audio or video type pattern algorithm
2023-12-07 10:31:54 -07:00
Kemal Zebari
62ca3b518b
LibWeb/MimeSniff: Add the image type pattern matching algorithm
2023-12-07 10:31:54 -07:00
Kemal Zebari
2babc08c17
LibWeb/MimeSniff: Add rules for identifying an unknown mime type
...
This also implements the pattern matching algorithm since it's
needed.
2023-12-07 10:31:54 -07:00
Kemal Zebari
04e19df06a
LibWeb/MimeSniff: Implement Resource
...
See https://mimesniff.spec.whatwg.org/#resource
2023-12-07 10:31:54 -07:00