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>"]

We're already combining, splitting, and then parsing, actually.  The "For each value of values" would just be removed, and we'd use value of [0] everywhere.  So it's one less step in the code, which I'm not sure can really be described as splitting, if what we were doing before isn't splitting.

Sorry, I'm not all that familiar with CORS.  Which section are you referring to as the request side of CORS that works differently?

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

Received on Wednesday, 21 November 2018 16:42:19 UTC