You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux solus 5.13.6-190.current #1 SMP PREEMPT Fri Jul 30 17:08:12 UTC 2021 x86_64 GNU/Linux
Subsystem
http
What steps will reproduce the bug?
http.validateHeaderValue('location', '☃')
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
No error.
What do you see instead?
TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["location"]
at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
at new NodeError (node:internal/errors:371:5)
at Object.__node_internal_ [as validateHeaderValue] (node:_http_outgoing:567:11) {
code: 'ERR_INVALID_CHAR'
}
We've been down this road before multiple times, the most recent HTTP/1.x RFC specifically calls out that header values should only contain ASCII or characters 0x80-0xFF (latin1).
Activity
szmarczak commentedon Aug 6, 2021
/cc @ronag @mcollina
mcollina commentedon Aug 6, 2021
This needs a fix in
node/lib/_http_common.js
Lines 225 to 234 in c7a0f1d
Should be a simple fix so I'm tagging it as a good first issue
mscdex commentedon Aug 6, 2021
We've been down this road before multiple times, the most recent HTTP/1.x RFC specifically calls out that header values should only contain ASCII or characters 0x80-0xFF (latin1).