Skip to content

fix(ext/node): add missing http2 header constants#32611

Merged
littledivy merged 1 commit intodenoland:mainfrom
kajukitli:fix-http2-accept-encoding-constants
Mar 10, 2026
Merged

fix(ext/node): add missing http2 header constants#32611
littledivy merged 1 commit intodenoland:mainfrom
kajukitli:fix-http2-accept-encoding-constants

Conversation

@kajukitli
Copy link
Copy Markdown
Contributor

@kajukitli kajukitli commented Mar 10, 2026

Adds missing HTTP2_HEADER_ACCEPT_ENCODING and related constants that grpc-js depends on. Without these, grpc-js server crashes with:

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at normalizeKey (metadata.js:38:16)
    at Metadata.remove (metadata.js:103:15)

when trying to normalize header keys in BaseServerInterceptingCall.

Added constants:

  • HTTP2_HEADER_ACCEPT
  • HTTP2_HEADER_ACCEPT_ENCODING
  • HTTP2_HEADER_ACCEPT_LANGUAGE
  • HTTP2_HEADER_ACCEPT_RANGES

Testing

With this fix, grpc-js server can handle requests:

$ grpcurl -plaintext -d '{"name":"Deno"}' localhost:50051 test.Greeter/SayHello
{
  "message": "Hello Deno"
}

Found while testing #26436 (which is fixed by the http2 rewrite).

Adds missing HTTP2_HEADER_ACCEPT_ENCODING and related constants that
grpc-js depends on. Without these, grpc-js crashes with:

  TypeError: Cannot read properties of undefined (reading 'toLowerCase')

when trying to normalize header keys in Metadata.remove().

Added constants:
- HTTP2_HEADER_ACCEPT
- HTTP2_HEADER_ACCEPT_ENCODING
- HTTP2_HEADER_ACCEPT_LANGUAGE
- HTTP2_HEADER_ACCEPT_RANGES

Fixes part of denoland#26436
@littledivy littledivy merged commit c0de125 into denoland:main Mar 10, 2026
113 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants