Skip to content

Commit

Permalink
Use HTTP whitespace rather than ASCII whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Nov 13, 2018
1 parent dc35803 commit 126286a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions mimesniff.bs
Expand Up @@ -217,7 +217,7 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
<p>To <dfn export>parse a MIME type</dfn>, given a string <var>input</var>, run these steps: <p>To <dfn export>parse a MIME type</dfn>, given a string <var>input</var>, run these steps:


<ol> <ol>
<li><p>Remove any leading and trailing <a>ASCII whitespace</a> from <var>input</var>. <li><p>Remove any leading and trailing <a>HTTP whitespace</a> from <var>input</var>.


<li><p>Let <var>position</var> be a <a for=string>position variable</a> for <var>input</var>, <li><p>Let <var>position</var> be a <a for=string>position variable</a> for <var>input</var>,
initially pointing at the start of <var>input</var>. initially pointing at the start of <var>input</var>.
Expand All @@ -236,7 +236,7 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
<li><p>Let <var>subtype</var> be the result of <a>collecting a sequence of code points</a> that are <li><p>Let <var>subtype</var> be the result of <a>collecting a sequence of code points</a> that are
not U+003B (;) from <var>input</var>, given <var>position</var>. not U+003B (;) from <var>input</var>, given <var>position</var>.


<li><p>Remove any trailing <a>ASCII whitespace</a> from <var>subtype</var>. <li><p>Remove any trailing <a>HTTP whitespace</a> from <var>subtype</var>.


<li><p>If <var>subtype</var> is the empty string or does not solely contain <li><p>If <var>subtype</var> is the empty string or does not solely contain
<a>HTTP token code points</a>, then return failure. <a>HTTP token code points</a>, then return failure.
Expand All @@ -252,7 +252,12 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>. (This skips <li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>. (This skips
past U+003B (;).) past U+003B (;).)


<li><p><a>Skip ASCII whitespace</a> within <var>input</var> given <var>position</var>. <li>
<p><a>Collect a sequence of code points</a> that are <a>HTTP whitespace</a> from
<var>input</var> given <var>position</var>.

<p class=note>This is roughly equivalent to <a>skip ASCII whitespace</a>, except that
<a>HTTP whitespace</a> is used rather than <a>ASCII whitespace</a>.


<li><p>Let <var>parameterName</var> be the result of <a>collecting a sequence of code points</a> <li><p>Let <var>parameterName</var> be the result of <a>collecting a sequence of code points</a>
that are not U+003B (;) or U+003D (=) from <var>input</var>, given <var>position</var>. that are not U+003B (;) or U+003D (=) from <var>input</var>, given <var>position</var>.
Expand Down Expand Up @@ -333,7 +338,7 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
<a>collecting a sequence of code points</a> that are not U+003B (;) from <var>input</var>, <a>collecting a sequence of code points</a> that are not U+003B (;) from <var>input</var>,
given <var>position</var>. given <var>position</var>.


<li><p>Remove any trailing <a>ASCII whitespace</a> from <var>parameterValue</var>. <li><p>Remove any trailing <a>HTTP whitespace</a> from <var>parameterValue</var>.


<li><p>If <var>parameterValue</var> is the empty string, then <a for=iteration>continue</a>. <li><p>If <var>parameterValue</var> is the empty string, then <a for=iteration>continue</a>.
</ol> </ol>
Expand Down

0 comments on commit 126286a

Please sign in to comment.