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

annevk commented on this pull request.



> +  "<code>;base64</code>", then:
+
+  <ol>
+   <li><p>Set <var>body</var> to the <span class=XXX>web base64 decoding</span> of <var>body</var>.
+   <!-- web base64 currently takes string input (see window.atob, which defines it for now). I guess
+        we can convert body to a string first by straightforward mapping, but maybe it would make
+        more sense if web base64 decoding operated on bytes? Or was polymorphic? -->
+
+   <li><p>If <var>body</var> is failure, then return failure.
+
+   <li><p>Remove the code point sequence that is an <a>ASCII case-insensitive</a> match for
+   "<code>;base64</code>" from <var>mimeType</var>.
+  </ol>
+
+ <li><p>If <var>mimeType</var> starts with an <a>ASCII case-insensitive</a> match for
+ "<code>charset;</code>", then prepend "<code>text/plain</code>" to <var>mimeType</var>.

The latter doesn't preserve anything in Chrome and Firefox though. The former does seem to preserve the charset value somehow, but doesn't work at all in Safari. I'm not sure we need to support it.

-- 
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_r133176659

Received on Tuesday, 15 August 2017 12:24:51 UTC