Fail fast on server-to-client requests in JSON-response mode instead of hanging (#3195)

This commit is contained in:
Max 2026-07-28 11:04:51 +01:00 • committed by GitHub
commit 528e366558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2608,6 +2608,16 @@ REQUIREMENTS: dict[str, Requirement] = {
"overtake anything already queued for the request."
),
),
"transport:streamable-http:json-response-restrictions": Requirement(
source="sdk",
behavior=(
"In JSON-response mode a handler's request-scoped server-initiated request fails fast with an "
"INVALID_REQUEST protocol error and request-scoped notifications are not delivered, because the "
"single JSON body carries only the response; the connection's standalone stream is unaffected."
),
transports=("streamable-http",),
note="Only observable over streamable HTTP: JSON-response mode is an HTTP framing option.",
),
"transport:streamable-http:stateless": Requirement(
source=f"{SPEC_BASE_URL}/basic/transports#streamable-http",
behavior=(