fetch
fetch copied to clipboard
HTTP/2 headers
I played around a bit with WPT's H2 support and I found that Chrome is quite restrictive on header values, unless I'm missing something. Basically, if they contain (after stripping leading and trailing HTTP whitespace, which includes newlines) anything but:
- 0x09
- 0x20 to 0x7E, inclusive
there's a network error.
This is for responses. I haven't checked requests (the API allows 0x80 and friends).
Firefox is a lot more permissive.
Restricting this seems reasonable, though we cannot really change the API (should there be an opt-in? probably not) or HTTP/1 behavior. If HTTP/2 (and HTTP/3?) do not require this already then perhaps Fetch should. At the very least it seems worth mentioning around the definition of header value.
This sounds like a dismayingly vast & novel restriction on how HTTP is used on the web. :(