Conversation
|
Additional verification context: the change is limited to preserving the existing 400 GitHub currently shows no completed check jobs or reviews for this commit, so the evidence above refers to the recorded local verification only.
|
0923355 to
30aa219
Compare
|
Rebased onto current
The rebase was clean, and the two changes do not overlap: #1837 edited Force-pushed to the PR branch ( Reproduction note: build/test locally with
|
When the POST body cannot be parsed as a JSON-RPC message, the 400 InvalidRequest response was a fixed one-liner that discarded the JsonException's reason and position. A body truncated by an intermediary (proxy, gateway, or transport) is therefore indistinguishable from any other malformed body without server-side logs (modelcontextprotocol#1842). The catch now includes the parser message and line/byte position in the error message, so the failure is diagnosable from the response alone. The message prefix and the conformant id=null envelope are unchanged.
30aa219 to
911a4dc
Compare
Summary
Surface JSON parse detail in streamable-HTTP 400 responses
Verification
dotnet test tests/ModelContextProtocol.AspNetCore.Tests -f net10.0 --filter 'FullyQualifiedName~StreamableHttpServerConformanceTests' (56 passed); new PostTruncatedJson theory + updated PostMalformedJson red-green verified (3 fail without the fix, 3 pass with it)
Related to #1842