Skip to content

Commit b3025f9

Browse files
authored
Run transport security tests in process instead of over sockets (#2764)
1 parent ed6adee commit b3025f9

5 files changed

Lines changed: 212 additions & 454 deletions

File tree

src/mcp/server/streamable_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ async def _handle_get_request(self, request: Request, send: Send) -> None:
669669
await response(request.scope, request.receive, send)
670670
return
671671

672-
if not await self._validate_request_headers(request, send): # pragma: no cover
672+
if not await self._validate_request_headers(request, send):
673673
return
674674

675675
# Handle resumability: check for Last-Event-ID header
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Transport-specific interaction tests, and the in-process streaming bridge they are built on.
2+
3+
`StreamingASGITransport` is re-exported here as the sanctioned import point for test code
4+
outside this suite (the bridge module itself is suite-private).
5+
"""
6+
7+
from tests.interaction.transports._bridge import StreamingASGITransport
8+
9+
__all__ = ["StreamingASGITransport"]

0 commit comments

Comments
 (0)