Re: [whatwg/fetch] Behavior of `Headers.set(name, null)` and `Headers.get(name)` (Issue #1792)

That is not a change we can make at this point. I'm also not sure that symmetry makes a whole lot of sense for this. Either `set()` would have to treat null and the empty string the same, or `get()` would have to return the empty string rather than null, necessitating the need for a `has()` call in certain circumstances. Neither of which would be very consistent with web platform APIs. See also `getAttribute()`, which was at some point defined to not return null, but nobody implemented it that way. And I think that's been for the better.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1792#issuecomment-2525454391
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1792/2525454391@github.com>

Received on Sunday, 8 December 2024 07:00:09 UTC