Can no longer parse header "X-Custom-Header-Bytes: …" despite browsers doing this fine #281
Description
This is causing jsdom to fail several web-platform-tests where it is tested that its behavior emulates XMLHttpRequest (jsdom/jsdom#1380). I believe this is a regression as of Node.js 5.6.0.
The test is a combination of https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/resources/headers.py and https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/getresponseheader-special-characters.htm where it tests that the server setting
X-Custom-Header-Bytes: …
results in the client receiving "\xE2\x80\xA6"
(i.e. "�"
).
We would like to be able to achieve this behavior in jsdom just like browsers are specified to do.
/cc @annevk for the standards-based perspective. I imagine it's something like "HTTP underspecifies interoperable behavior" but couldn't find anything in Fetch that specifically addresses the issue of what to do when headers are not valid according to HTTP's field-content
production. Maybe the test is wrong?