Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.1k
Streamable HTTP: pre-existing hardening items from the #2547 review #2562
Copy link
Copy link
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workingready for workEnough information for someone to start working onEnough information for someone to start working onv1Issues / PRs related to v1.xIssues / PRs related to v1.xv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Description
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workingready for workEnough information for someone to start working onEnough information for someone to start working onv1Issues / PRs related to v1.xIssues / PRs related to v1.xv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Three pre-existing Streamable HTTP transport items surfaced during the #2547 review that are independent of the keep-alive and delivery work there. Collecting them here so they don't get lost; each is small enough to fix individually.
Protocol-version gate accepts unvalidated strings on initialize. The priming/resumability gate compares
protocolVersion >= '2025-11-25'lexicographically, and for initialize requests the string comes verbatim from the request body without being checked againstSUPPORTED_PROTOCOL_VERSIONS(non-initialize requests are header-validated). Unsupported strings that sort above the threshold (draft,2026-01-01) enable priming events and the polling callbacks for the initialize stream even though the negotiated version in the response may be lower. Gate on the negotiated version instead.Concurrent DELETE requests can fire
onsessionclosedtwice. While the first DELETE is parked on the callback await,_closedis still false, so a second DELETE passes the guards and fires the callback again for the same session. A flag set before invoking the callback closes the window.The
EventStorecontract has no session scoping for the standalone stream. Every transport stores standalone server-initiated messages under the fixed id_GET_stream, so a store instance shared across sessions (module-level store inssePollingExample, or any multi-node shared store) mixes sessions on standalone resume: one session's resume can replay another session's notifications. The contract needs a session dimension, or documented single-session store usage.Applies to both main and v1.x.