Skip to content

Allow stateful HTTP endpoints to recover after DELETE - #307

Open
EhsanAzish80 wants to merge 1 commit into
modelcontextprotocol:mainfrom
EhsanAzish80:fix/stateful-session-recovery
Open

EhsanAzish80 wants to merge 1 commit into
modelcontextprotocol:mainfrom
EhsanAzish80:fix/stateful-session-recovery

Conversation

@EhsanAzish80

Copy link
Copy Markdown

Fixes #286 for stateful HTTP endpoints. A StatefulHTTPServerTransport handles one session; the new session manager creates a fresh server and transport for each initialize. The built-in HTTP app uses it, stops the old server after DELETE, and returns 404 for the retired session ID.

Tests: 561 Swift tests passed. A real HTTP loopback passed initialize → DELETE → new initialize with a different session ID, then 404 for the old ID. The 2025 server-initialize conformance scenario passed 3/3.

AI was used to write the tests. I ran them locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant