Re: [whatwg/fetch] Define the Content-Type header parser (#831)

MattMenke2 commented on this pull request.



> +  <p><a for=list>For each</a> <var>value</var> of <var>values</var>:
+
+  <ol>
+   <li><p>Set <var>mimeType</var> to the result of <a lt="parse a MIME type">parsing</a>
+   <var>value</var>.
+
+   <li><p>If <var>mimeType</var> is failure, then <a for=iteration>continue</a>.
+
+   <li>
+    <p>If <var>mimeType</var>'s <a for="MIME type">essence</a> is not "<code>*/*</code>" or
+    <var>essence</var>, then:
+
+    <ol>
+     <li><p>Set <var>charset</var> to null.
+
+     <li><p>If <var>mimeType</var>'s <a for="MIME type">parameters</a>["<code>charset</code>"]

One other question:  Should we be taking the first MIME type rather than the last?  This would change behavior, but it would match the fact we prefer earlier charsets.  I had thought this was discussed as a potential change elsewhere.  I'm not pushing strongly for a change here, as I think all browsers currently prefer later MIME types, but thought I'd bring it up.

-- 
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/831#pullrequestreview-176892462

Received on Tuesday, 20 November 2018 17:41:06 UTC