fix: Use lowercase header names
This commit is contained in:
parent
cc9ae5b4ac
commit
970cf9d5b1
2 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ describe("StreamableHTTPServerTransport", () => {
|
|||
expect(mockResponse.writeHead).toHaveBeenCalledWith(
|
||||
200,
|
||||
expect.objectContaining({
|
||||
"Mcp-Session-Id": transport.sessionId,
|
||||
"mcp-session-id": transport.sessionId,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ export class StreamableHTTPServerTransport implements Transport {
|
|||
"Content-Type": "text/event-stream",
|
||||
"Cache-Control": "no-cache",
|
||||
Connection: "keep-alive",
|
||||
"Mcp-Session-Id": this._sessionId,
|
||||
"mcp-session-id": this._sessionId,
|
||||
});
|
||||
|
||||
const connection: StreamConnection = {
|
||||
|
|
@ -214,7 +214,7 @@ export class StreamableHTTPServerTransport implements Transport {
|
|||
"Content-Type": "text/event-stream",
|
||||
"Cache-Control": "no-cache",
|
||||
Connection: "keep-alive",
|
||||
"Mcp-Session-Id": this._sessionId,
|
||||
"mcp-session-id": this._sessionId,
|
||||
});
|
||||
|
||||
const connectionId = randomUUID();
|
||||
|
|
@ -249,7 +249,7 @@ export class StreamableHTTPServerTransport implements Transport {
|
|||
// use direct JSON response
|
||||
res.writeHead(200, {
|
||||
"Content-Type": "application/json",
|
||||
"Mcp-Session-Id": this._sessionId,
|
||||
"mcp-session-id": this._sessionId,
|
||||
});
|
||||
|
||||
// handle each message
|
||||
|
|
|
|||
Loading…
Reference in a new issue