Why a value cannot be sent in the name header, or undefined when it can. Node throws
an opaque, synchronous ERR_INVALID_CHAR from inside request() for a value outside
\t, 0x20–0x7e and obs-text (0x80–0xff) — a --user-agent holding an emoji or an en
dash surfaced as "Unexpected error". Latin-1 is left through: the grammar deprecates
it but Node sends it and servers read it. Checked by code point so the source stays
free of control bytes.
Why a value cannot be sent in the
nameheader, or undefined when it can. Node throws an opaque, synchronousERR_INVALID_CHARfrom insiderequest()for a value outside\t, 0x20–0x7e and obs-text (0x80–0xff) — a--user-agentholding an emoji or an en dash surfaced as "Unexpected error". Latin-1 is left through: the grammar deprecates it but Node sends it and servers read it. Checked by code point so the source stays free of control bytes.