Repository navigation
fix(node): forward response Set-Cookie fields separately - #2990
rudycelekli wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 5bb975d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
karaaslanz
left a comment
There was a problem hiding this comment.
Independent bounded verification of exact PR head 5bb975d6faf3aa08d86d56c8ef0946b7fb8ce9a6 (Node 22, real node:http response). I ran the changed header-forwarding block against a web Response with two separate Set-Cookie values. Baseline header iteration without getSetCookie() forwarded only the last cookie; the PR's getSetCookie() override passed both distinct values to a real Node HTTP client. Additional cases with a single cookie and no cookies, each including an unrelated header, also passed (3/3). This confirms the targeted adapter behavior and doesn't represent a full repo/test suite run or a claim about every supported runtime. No blocking issue found in the cookie-forwarding path tested.
Preserve separate Set-Cookie header values when adapting a web Response to Node. The adapter forwards getSetCookie() as a string array instead of losing earlier cookies during header iteration.
Validation: official package typecheck, ESLint and Prettier passed. 15 adapter tests passed with explicit source aliases for core-internal and server/_shims, matching tsconfig paths. Default Vitest collection remains blocked by private workspace exports pointing to unbuilt dist; core/server builds did not resolve that setup issue.
The cookie regression fails on unchanged source and passes after the fix. No default-runner, full SDK monorepo, or hosted CI pass is claimed. AI-assisted implementation and tests, independently reviewed before publishing this draft.