We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d88308b commit 0058c30Copy full SHA for 0058c30
src/server/streamableHttp.ts
@@ -463,7 +463,12 @@ export class StreamableHTTPServerTransport implements Transport {
463
* Returns true if the session is valid, false otherwise
464
*/
465
private validateSession(req: IncomingMessage, res: ServerResponse): boolean {
466
- if (this.sessionId && !this._initialized) {
+ if (this.sessionId === undefined) {
467
+ // If the session ID is not set, the session management is disabled
468
+ // and we don't need to validate the session ID
469
+ return true;
470
+ }
471
+ if (!this._initialized) {
472
// If the server has not been initialized yet, reject all requests
473
res.writeHead(400).end(JSON.stringify({
474
jsonrpc: "2.0",
0 commit comments