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

foolip commented on this pull request.



> +
+ <li><p>Let <var>position</var> point at the start of <var>input</var>.
+
+ <li><p>Let <var>encodedMimeType</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>Let <var>mimeTypeBytes</var> be the <a>string percent decoding</a> of
+ <var>encodedMimeType</var>.
+ <!-- Note: implementations leave the percent-encoded bits around. That strikes me as rather broken,

So, a cast that isn't entirely far fetched is `data:video/ogg;codecs=theora,vorbis,...`. Even though I don't know of a case where the codecs are *needed*, it is valid to have a comma in a media type.

No objections to try to spec the more reasonable behavior, but it'd be good if it's isolated to a few tests, so that if they're all still failing in a year or so, reversing course will be a small effort.

-- 
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#discussion_r137551063

Received on Thursday, 7 September 2017 14:16:50 UTC