Merge pull request #245 from koic/fix_sse_response_status
Return 202 Accepted for SSE responses per MCP spec
This commit is contained in:
commit
76ab822ad7
1 changed files with 42 additions and 1 deletions
|
|
@ -288,7 +288,7 @@ module MCP
|
|||
def send_response_to_stream(stream, response, session_id)
|
||||
message = JSON.parse(response)
|
||||
send_to_stream(stream, message)
|
||||
[200, { "Content-Type" => "application/json" }, [{ accepted: true }.to_json]]
|
||||
handle_accepted
|
||||
rescue IOError, Errno::EPIPE => e
|
||||
MCP.configuration.exception_reporter.call(
|
||||
e,
|
||||
|
|
|
|||
Loading…
Reference in a new issue