Skip to content

Commit 8e9a7dd

Browse files
authored
Use collect an HTTP quoted string from Fetch
See whatwg/fetch#831.
1 parent 126286a commit 8e9a7dd

File tree

1 file changed

+6
-42
lines changed

1 file changed

+6
-42
lines changed

mimesniff.bs

+6-42
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ a <a>valid MIME type string</a> that does not contain U+003B (;).
230230

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

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

236235
<li><p>Let <var>subtype</var> be the result of <a>collecting a sequence of code points</a> that are
237236
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 (;).
249248
<p>While <var>position</var> is not past the end of <var>input</var>:
250249

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

255253
<li>
256254
<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 (;).
271269
<li><p>If the <a>code point</a> at <var>position</var> within <var>input</var> is U+003B (;),
272270
then <a for=iteration>continue</a>.
273271

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

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

281-
<li><p>Let <var>parameterValue</var> be the empty string.
278+
<li><p>Let <var>parameterValue</var> be null.
282279

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

287284
<ol>
288-
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>.
289-
290-
<li>
291-
<p>While true:
292-
293-
<ol>
294-
<li><p>Append the result of <a>collecting a sequence of code points</a> that are not
295-
U+0022 (") or U+005C (\) from <var>input</var>, given <var>position</var>, to
296-
<var>parameterValue</var>.
297-
298-
<li>
299-
<p>If <var>position</var> is not past the end of <var>input</var> and the <a>code point</a>
300-
at <var>position</var> within <var>input</var> is U+005C (\), then:
301-
302-
<ol>
303-
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>.
304-
305-
<li>
306-
<p>If <var>position</var> is not past the end of <var>input</var>, then:
307-
308-
<ol>
309-
<li><p>Append the <a>code point</a> at <var>position</var> within <var>input</var> to
310-
<var>parameterValue</var>.
311-
312-
<li><p>Advance <var>position</var> to the next <a>code point</a> in <var>input</var>.
313-
314-
<li><p><a for=iteration>Continue</a>.
315-
</ol>
316-
317-
<li><p>Otherwise, append U+005C (\) to <var>parameterValue</var> and
318-
<a for=iteration>break</a>.
319-
</ol>
320-
321-
<li><p>Otherwise, <a for=iteration>break</a>.
322-
</ol>
285+
<li><p>Set <var>parameterValue</var> to the result of <a>collecting an HTTP quoted string</a>
286+
from <var>input</var>, given <var>position</var> and the <var ignore>extract-value flag</var>.
323287

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

0 commit comments

Comments
 (0)