Deal with non-UTF-8 cookies
I think I raised this before, but I don't really see text about it in the specification. If you limit yourself to UTF-8, you need to deal with cookies that do not decode as UTF-8, presumably by dropping them as Chrome appears to do for document.cookie. That should be specified somehow.
I think that means cookies need to use "UTF-8 decode without BOM or fail" from Encoding.
Ideally the way this would be specified is by sharing logic with document.cookie, FWIW. (Something I also raised before.)
Thanks and +1. @bsittler did substantial investigation into cross-browser and API/header behavior with encoding, but I'm not sure that research was retained and was definitely not reflected into the spec.
We should audit test coverage and get coverage/spec updates.
(Sharing w/ HTML also SGTM. PRs/concrete suggestions welcome!)