-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests for MIME sniffing? #1851
Comments
There should be a lot of tests somewhere for this. I imagine the Gecko and Chrome/WebKit source trees have them. |
Note that I've since landed tests for MIME type parsing. Sniffing algorithm is not yet covered though. |
annevk: I think the MIME parsing tests could still be beefed up, to poke around edges of the spec, where I think it's likely that even browsers that pass all tests may differ in behaviors. Some suggestions: text/html;charset= "gbk" (I don't think this should be parsed as GBK, since the pseudo code in the spec only looks for quotes immediately after the =) |
And a couple more: text/html;charset= ";charset=GBK (Parses as GBK - first parses as space-quote, and quotes aren't allowed in names, so it's skipped in favor of the second one) |
Tests suggested at #1851 (comment). Co-Authored-By: Matt Menke <mmenke@google.com>
Tests suggested at #1851 (comment). Co-Authored-By: Matt Menke <mmenke@google.com>
Automatic update from web-platform-testsNew MIME type parsing tests Tests suggested at web-platform-tests/wpt#1851 (comment). Co-Authored-By: Matt Menke <mmenke@google.com> wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279
Automatic update from web-platform-testsNew MIME type parsing tests Tests suggested at web-platform-tests/wpt#1851 (comment). Co-Authored-By: Matt Menke <mmenkegoogle.com> wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 UltraBlame original commit: c35053a6372f9c1c7ef2ccf31adce23c5b4733d3
Automatic update from web-platform-testsNew MIME type parsing tests Tests suggested at web-platform-tests/wpt#1851 (comment). Co-Authored-By: Matt Menke <mmenkegoogle.com> wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 UltraBlame original commit: c35053a6372f9c1c7ef2ccf31adce23c5b4733d3
Automatic update from web-platform-testsNew MIME type parsing tests Tests suggested at web-platform-tests/wpt#1851 (comment). Co-Authored-By: Matt Menke <mmenkegoogle.com> wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 wpt-commits: ef7fe9a35d808528f92f29b70e4b7ee273c75c85 wpt-pr: 10279 UltraBlame original commit: c35053a6372f9c1c7ef2ccf31adce23c5b4733d3
I couldn't find any tests for MIME sniffing except for fetch/nosniff.
We should add some tests that fetch various resources via an iframe (or XHR if that would work) and check the mime type.
https://mimesniff.spec.whatwg.org
The text was updated successfully, but these errors were encountered: