Skip to content

fix: replace DOM-only HeadersInit with RequestInit['headers'] in normalizeHeaders - #2804

Closed
KooshaPari wants to merge 1 commit into
modelcontextprotocol:v1.xfrom
KooshaPari:fix-2568-normalizeHeaders-headersInit
Closed

fix: replace DOM-only HeadersInit with RequestInit['headers'] in normalizeHeaders#2804
KooshaPari wants to merge 1 commit into
modelcontextprotocol:v1.xfrom
KooshaPari:fix-2568-normalizeHeaders-headersInit

Conversation

@KooshaPari

Copy link
Copy Markdown

Fixes #2568

…alizeHeaders

Fixes #2568. The bare global `HeadersInit` is a DOM lib type that
@types/node cannot bind, so Node-only consumers with skipLibCheck: false
fail to build. Using `RequestInit['headers']` is semantically equivalent
and available in all environments.

Adds tests for normalizeHeaders covering plain objects, arrays of tuples,
Headers instances, and undefined input.
@KooshaPari
KooshaPari requested a review from a team as a code owner September 13, 2026 05:29
Copilot AI lite review requested due to automatic review settings September 13, 2026 05:29
@changeset-bot

changeset-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 801b1a8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pkg-pr-new

pkg-pr-new Bot commented Sep 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@modelcontextprotocol/sdk@2804

commit: 801b1a8

@KooshaPari KooshaPari closed this by deleting the head repository Sep 13, 2026
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.

2 participants