This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7549 - define how to parse a MIME type
Summary: define how to parse a MIME type
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Keywords: NE, NoReply
Depends on:
Reported: 2009-09-09 10:17 UTC by Anne
Modified: 2010-10-04 14:46 UTC (History)
3 users (show)

See Also:


Description Anne 2009-09-09 10:17:42 UTC
Define how to parse a MIME type so it becomes a little more clear how e.g. <script type=...> is supposed to work (and other things taking a MIME type).

<script type"text/javascript "> (trailing space) ought to work per this algorithm by the way.
Comment 1 Ian 'Hixie' Hickson 2009-09-19 10:43:25 UTC
It turns out that since HTTP doesn't actually define this (you have to read between the lines or apply "common sense" to get an idea of how to parse MIME types, and error handling isn't defined at all), different parts of the platform have different requirements for how to handle MIME types. For example, "text/javascript;" (with the semicolon) is not a match in <script type="">, but "text/html;" is considered an HTML file, despite this MIME type not matching the grammar in the HTTP spec.

I added text to handle trimming spaces in <script type>. I haven't done anything for general MIME type handling. I think this is probably something for MIMESNIFF, since I doubt the HTTPWG will be fixing HTTPbis to define this.
Comment 2 Maciej Stachowiak 2010-03-14 14:50:53 UTC
This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.