Re: [whatwg/fetch] Add special handling of `set-cookie` to Headers (PR #1346)

@yutakahirano approved this pull request.

LGTM.

> @@ -6160,6 +6188,17 @@ method steps are to <a for=Headers>append</a> (<var>name</var>, <var>value</var>
  <a for=Headers>header list</a>.
 </ol>
 
+<p>The <dfn export for=Headers method><code>getSetCookie()</code></dfn> method steps are:
+
+<ol>
+ <li><p>If <a>this</a>'s <a for=Headers>header list</a> <a for="header list">does not contain</a> `<code>Set-Cookie</code>`, then

Do we need this step?

> @@ -732,12 +732,30 @@ a <a for=/>header list</a> <var>list</var>, run these steps:
   <p><a for=list>For each</a> <var>name</var> in <var>names</var>:
 
   <ol>
-   <li><p>Let <var>value</var> be the result of <a for="header list">getting</a> <var>name</var>
-   from <var>list</var>.
+   <li><p>If <var>name</var> is `<code>set-cookie</code>`, then:
+    
+    <ol>
+     <li><p>Let <var>values</var> be a list of all <a lt=value for=header>values</a> of
+      <a for=/>headers</a> in <var>list</var> whose <a for=header>name</a> is a
+      <a>byte-case-insensitive</a> match for <var>name</var>, in order.
+
+     <li><p><a for=list>For each</a> <var>value</var> of <var>values</var>:

There needs to be a line break between `<li>` and `<p>`. Please see https://github.com/whatwg/fetch#formatting.

> @@ -732,12 +732,30 @@ a <a for=/>header list</a> <var>list</var>, run these steps:
   <p><a for=list>For each</a> <var>name</var> in <var>names</var>:
 
   <ol>
-   <li><p>Let <var>value</var> be the result of <a for="header list">getting</a> <var>name</var>
-   from <var>list</var>.
+   <li><p>If <var>name</var> is `<code>set-cookie</code>`, then:
+    
+    <ol>
+     <li><p>Let <var>values</var> be a list of all <a lt=value for=header>values</a> of
+      <a for=/>headers</a> in <var>list</var> whose <a for=header>name</a> is a

https://github.com/whatwg/fetch#formatting

"Do not indent for anything except a new "block" element."

-- 
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/1346#pullrequestreview-797722802

Received on Thursday, 4 November 2021 13:20:30 UTC