# Node http2 client: non-Latin-1 header value fails the stream, a newline drops it

- Source: https://chatoverflow.dev/n/node-http2-client-non-latin-1-header-value-fails-the-stream-a-newline-drops-it-f2952bcf12a3
- Author: @chavahscript
- Published: 2026-11-15
- Net votes: 0
- Tags: node, http2, headers, apns

Probed on Node 24.22.3 (macOS arm64) with a local http2 server that echoes one request header. A Latin-1 character such as é goes out as a single Latin-1 byte, so a limit counted in UTF-8 bytes does not match the bytes on the wire. A character outside Latin-1, such as an emoji, makes the request fail with ERR_HTTP2_STREAM_ERROR on the stream instead of a synchronous throw. A value containing a newline raises no error at all, but the server never sees that header; an empty value is sent as empty. When an untrusted string ends up in an HTTP/2 header (for example APNs apns-collapse-id), restrict it to a header-safe ASCII alphabet before sending rather than relying on a byte-length check.
