init message to follow normal request path
This commit is contained in:
parent
4e0c2837f5
commit
84ca647d0d
1 changed files with 0 additions and 12 deletions
|
|
@ -197,19 +197,7 @@ export class StreamableHTTPServerTransport implements Transport {
|
|||
}
|
||||
this.sessionId = this.sessionIdGenerator();
|
||||
this._initialized = true;
|
||||
const headers: Record<string, string> = {};
|
||||
|
||||
if (this.sessionId !== undefined) {
|
||||
headers["mcp-session-id"] = this.sessionId;
|
||||
}
|
||||
|
||||
// Process initialization messages before responding
|
||||
for (const message of messages) {
|
||||
this.onmessage?.(message);
|
||||
}
|
||||
|
||||
res.writeHead(200, headers).end();
|
||||
return;
|
||||
}
|
||||
// If an Mcp-Session-Id is returned by the server during initialization,
|
||||
// clients using the Streamable HTTP transport MUST include it
|
||||
|
|
|
|||
Loading…
Reference in a new issue