https://github.com/github/fetch/blob/8f48ca686f9564bf52704e0e4b410ca970b17031/fetch.js#L53
I just ran into an issue with a rogue server that sends a white space delimited response header. My tests never caught this issue, because node-fetch safely ignores invalid headers and just omits them from the response.headers.
I believe invalid header names should not render the whole response invalid and non-parsable.
I therefore propose to to merely emit a console.warn with the field name in question and its value.
https://github.com/github/fetch/blob/8f48ca686f9564bf52704e0e4b410ca970b17031/fetch.js#L53
I just ran into an issue with a rogue server that sends a white space delimited response header. My tests never caught this issue, because node-fetch safely ignores invalid headers and just omits them from the
response.headers.I believe invalid header names should not render the whole response invalid and non-parsable.
I therefore propose to to merely emit a
console.warnwith the field name in question and its value.