Skip to content
Permalink
Browse files

Use collect an HTTP quoted string from Fetch

  • Loading branch information...
annevk committed Nov 28, 2018
1 parent 126286a commit 8e9a7dd90717c595a4e4d982cd216e4411d33736
Showing with 6 additions and 42 deletions.
  1. +6 −42 mimesniff.bs
@@ -230,8 +230,7 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).

<li><p>If <var>position</var> is past the end of <var>input</var>, then return failure.

<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>. (This skips
past U+002F (/).)
<li><p>Advance <var>position</var> by 1. (This skips past U+002F (/).)

<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>.
@@ -249,8 +248,7 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
<p>While <var>position</var> is not past the end of <var>input</var>:

<ol>
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>. (This skips
past U+003B (;).)
<li><p>Advance <var>position</var> by 1. (This skips past U+003B (;).)

<li>
<p><a>Collect a sequence of code points</a> that are <a>HTTP whitespace</a> from
@@ -271,55 +269,21 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
<li><p>If the <a>code point</a> at <var>position</var> within <var>input</var> is U+003B (;),
then <a for=iteration>continue</a>.

<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>. (This
skips past U+003D (=).)
<li><p>Advance <var>position</var> by 1. (This skips past U+003D (=).)
</ol>

<li><p>If <var>position</var> is past the end of <var>input</var>, then
<a for=iteration>break</a>.

<li><p>Let <var>parameterValue</var> be the empty string.
<li><p>Let <var>parameterValue</var> be null.

<li>
<p>If the <a>code point</a> at <var>position</var> within <var>input</var> is U+0022 ("),
then:

<ol>
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>.

<li>
<p>While true:

<ol>
<li><p>Append the result of <a>collecting a sequence of code points</a> that are not
U+0022 (") or U+005C (\) from <var>input</var>, given <var>position</var>, to
<var>parameterValue</var>.

<li>
<p>If <var>position</var> is not past the end of <var>input</var> and the <a>code point</a>
at <var>position</var> within <var>input</var> is U+005C (\), then:

<ol>
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>.

<li>
<p>If <var>position</var> is not past the end of <var>input</var>, then:

<ol>
<li><p>Append the <a>code point</a> at <var>position</var> within <var>input</var> to
<var>parameterValue</var>.

<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>.

<li><p><a for=iteration>Continue</a>.
</ol>

<li><p>Otherwise, append U+005C (\) to <var>parameterValue</var> and
<a for=iteration>break</a>.
</ol>

<li><p>Otherwise, <a for=iteration>break</a>.
</ol>
<li><p>Set <var>parameterValue</var> to the result of <a>collecting an HTTP quoted string</a>
from <var>input</var>, given <var>position</var> and the <var ignore>extract-value flag</var>.

<li>
<p><a>Collect a sequence of code points</a> that are not U+003B (;) from <var>input</var>,

0 comments on commit 8e9a7dd

Please sign in to comment.
You can’t perform that action at this time.