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

@annevk commented on this pull request.

I just realized that an alternative way of solving the request `Headers` representation issue would be to always return an empty list for `getSetCookie()` there. Then we don't really have to forbid adding it, but I think what we ended up with is fine.

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

I don't think it's defined behavior what the next step ends up returning otherwise. E.g., things like "in order" expect a list. At the very least we'd have to add "if any" somewhere in there, but I think this is much clearer.

However, this step does need some rewrapping to account for a 100 columns. I also think this PR in general could do with some rebasing.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1346#pullrequestreview-1054299246
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1346/review/1054299246@github.com>

Received on Thursday, 28 July 2022 15:10:51 UTC