You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(server): allow application/json-only Accept in JSON response mode (closes#1944)
`StreamableHTTPServerTransport` rejected `Accept: application/json`
with 406 even when the transport was built with `enableJsonResponse: true`
(i.e. pure request/response, no SSE). Branch the Accept check on
`_enableJsonResponse`: in JSON-only mode, require `application/json`;
in streaming mode, continue to require both `application/json` and
`text/event-stream` (on-wire spec remains unchanged for that path).
GET (SSE subscription) is unaffected.
Two regression tests added in the JSON Response Mode suite:
1. POST with `Accept: application/json` is now 200.
2. POST with an incompatible Accept (e.g. `text/plain`) is still 406.
Closes#1944.
0 commit comments