Re: [whatwg/fetch] Define data: URLs (#579)

domenic commented on this pull request.



> + <var>dataURL</var> with the <i>exclude fragment flag</i> set.
+
+ <li><p>Remove the leading "<code>data:</code>" string from <var>input</var>.
+
+ <li><p>Let <var>position</var> point at the start of <var>input</var>.
+
+ <li><p>Let <var>mimeType</var> be the result of <a>collecting a sequence of code points</a> that
+ are not equal to U+002C (,), given <var>position</var>.
+
+ <li><p>If <var>position</var> is past the end of <var>input</var>, then return failure.
+
+ <li><p>Advance <var>position</var> by 1.
+
+ <li><p>Let <var>encodedBody</var> be the remainder of <var>input</var>.
+
+ <li><p><a>Strip leading and trailing ASCII whitespace</a> from <var>mimeType</var>.

It'd be nice to move this step up a bit to right after "Let mimeType be..."; its placement here in the middle of creating encodedBody seems kind of random.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/579#pullrequestreview-82342893

Received on Sunday, 10 December 2017 07:09:41 UTC