Add SSE response mode to the 2026 streamable-HTTP server entry (#3001)
This commit is contained in:
parent
c0ecb70e24
commit
067f90578c
1 changed files with 517 additions and 112 deletions
|
|
@ -170,7 +170,9 @@ class StreamableHTTPSessionManager:
|
|||
header = MCP_PROTOCOL_VERSION_HEADER.encode("ascii")
|
||||
pv = next((v.decode("latin-1") for k, v in scope["headers"] if k == header), None)
|
||||
if pv is not None and pv not in HANDSHAKE_PROTOCOL_VERSIONS:
|
||||
await handle_modern_request(self.app, self.security_settings, self._lifespan_state, scope, receive, send)
|
||||
await handle_modern_request(
|
||||
self.app, self.security_settings, self.json_response, self._lifespan_state, scope, receive, send
|
||||
)
|
||||
return
|
||||
|
||||
# Dispatch to the appropriate handler
|
||||
|
|
|
|||
Loading…
Reference in a new issue