Skip to content

Conversation

@mathetake
Copy link
Contributor

@mathetake mathetake commented Aug 26, 2025

This commit fixes the accept header check for DELETE request on connection close. Previously, the accept content type was checked unconditionally regardless of whether it is DELETE or not in StreamableHTTPHandler.ServeHTTP.

As a result, previously, any DELETE request from client here on session close always resulted in "Accept must contain both 'application/json' and 'text/event-stream' response with the status code 400 (invalid request) as opposed to expecting 204 (no content).

@mathetake mathetake changed the title mcp/streamable: fixes broken DELETE request on session close mcp/streamable: fixes broken response to DELETE on session close Aug 26, 2025
Signed-off-by: Takeshi Yoneda <[email protected]>
@mathetake
Copy link
Contributor Author

@findleyr thanks for the comment. I addressed both comments.

@findleyr findleyr merged commit a76bae3 into modelcontextprotocol:main Aug 27, 2025
5 checks passed
@mathetake mathetake deleted the fixdeleteaccep branch August 27, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants