<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20067</bug_id>
          
          <creation_ts>2012-11-23 16:55:34 +0000</creation_ts>
          <short_desc>Describe how to parse MIME types</short_desc>
          <delta_ts>2013-05-27 20:59:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>MIME</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gordon P. Hemsley">gphemsley</reporter>
          <assigned_to name="Gordon P. Hemsley">gphemsley</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+mimespec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78709</commentid>
    <comment_count>0</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2012-11-23 16:55:34 +0000</bug_when>
    <thetext>Roughly:

type/subtype; name1=value1; name2=value2; ...

(.+)\/(.+)(?:;\s*(?:(.+)\s*(?:=\s*(.*))?)?)*

\1 = type
\2 = subtype
{
\3 = parameter name
\4 = parameter value
}*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87367</commentid>
    <comment_count>1</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2013-05-07 18:37:45 +0000</bug_when>
    <thetext>I added a work-in-progress algorithm for this a few months back:

https://github.com/whatwg/mimesniff/commit/d4a84208820af1e74a8d4176ad6966aa294d9127

http://mimesniff.spec.whatwg.org/#parsing-a-mime-type

But it&apos;s been suggested that I use some ABNF and error handling instead, so I might choose to do that in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88259</commentid>
    <comment_count>2</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2013-05-27 20:59:38 +0000</bug_when>
    <thetext>I&apos;ve made enough changes to the algorithm recently that I think this is reasonably complete. (Problems should go in new bugs.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>