Skip to content

Commit 970cf9d

Browse files
gylove1994ihrpr
authored andcommitted
fix: Use lowercase header names
1 parent cc9ae5b commit 970cf9d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/server/streamable-http.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe("StreamableHTTPServerTransport", () => {
6969
expect(mockResponse.writeHead).toHaveBeenCalledWith(
7070
200,
7171
expect.objectContaining({
72-
"Mcp-Session-Id": transport.sessionId,
72+
"mcp-session-id": transport.sessionId,
7373
})
7474
);
7575
});

src/server/streamable-http.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class StreamableHTTPServerTransport implements Transport {
113113
"Content-Type": "text/event-stream",
114114
"Cache-Control": "no-cache",
115115
Connection: "keep-alive",
116-
"Mcp-Session-Id": this._sessionId,
116+
"mcp-session-id": this._sessionId,
117117
});
118118

119119
const connection: StreamConnection = {
@@ -214,7 +214,7 @@ export class StreamableHTTPServerTransport implements Transport {
214214
"Content-Type": "text/event-stream",
215215
"Cache-Control": "no-cache",
216216
Connection: "keep-alive",
217-
"Mcp-Session-Id": this._sessionId,
217+
"mcp-session-id": this._sessionId,
218218
});
219219

220220
const connectionId = randomUUID();
@@ -249,7 +249,7 @@ export class StreamableHTTPServerTransport implements Transport {
249249
// use direct JSON response
250250
res.writeHead(200, {
251251
"Content-Type": "application/json",
252-
"Mcp-Session-Id": this._sessionId,
252+
"mcp-session-id": this._sessionId,
253253
});
254254

255255
// handle each message

0 commit comments

Comments
 (0)