-
Notifications
You must be signed in to change notification settings - Fork 44
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
Remove sniffing of HTML #192
Conversation
As no user agent today appears to identify a text/html resource starting with <rss as XML, remove those rules from the standard. At the same time, make it more clear that XML (and now HTML) are never sniffed. This is a non-normative change for clarity. Tests: TBD. Closes #173.
If the <a>supplied MIME type</a>'s <a for="MIME type">essence</a> is "<code>text/html</code>", | ||
execute the <a>rules for distinguishing if a resource is a feed or HTML</a> and | ||
abort these steps. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on board with the rest of this, but why rearrange the steps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated in the commit message, for clarity. If we never sniff these types it seems better to make that clear upfront.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more logical sense where it is; it's the first thing after the anomaly handing. If the no-sniff flag is set, for example, the steps will have already aborted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for me the confusing part is really the check-for-apache-bug flag as it's not clear what the supplied MIME type can and cannot be. It also seems weird to me to handle unknown MIME types before HTML and XML, but I could live with that I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GPHemsley does that make sense?
Automatic update from web-platform-tests MIME Sniffing: HTML no feed For whatwg/mimesniff#192. -- wpt-commits: 48369a247abab60f100a84de8faef3cacf0b42c5 wpt-pr: 47002
Automatic update from web-platform-tests MIME Sniffing: HTML no feed For whatwg/mimesniff#192. -- wpt-commits: 48369a247abab60f100a84de8faef3cacf0b42c5 wpt-pr: 47002
Automatic update from web-platform-tests MIME Sniffing: HTML no feed For whatwg/mimesniff#192. -- wpt-commits: 48369a247abab60f100a84de8faef3cacf0b42c5 wpt-pr: 47002
As no user agent today appears to identify a text/html resource starting with <rss as XML, remove those rules from the standard.
At the same time, make it more clear that XML (and now HTML) are never sniffed. This is a non-normative change for clarity.
Tests: web-platform-tests/wpt#47002.
Closes #173.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff