Skip to content

Commit dc135e3

Browse files
author
KaiyiQuan
committed
test(server): assert the SSE server survives a rejected request
1 parent b495799 commit dc135e3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/server/test_sse_security.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ async def test_sse_security_invalid_host_header() -> None:
9191
# The server process must stay alive after the rejected request: a
9292
# subsequent request to the message endpoint is still served (the
9393
# unknown-session 404 proves routing works rather than hanging).
94-
response = await client.post("/messages/?session_id=12345678123456781234567812345678")
94+
response = await client.post(
95+
"/messages/?session_id=12345678123456781234567812345678",
96+
headers={"Content-Type": "application/json"},
97+
)
9598
assert response.status_code == 404
9699

97100

0 commit comments

Comments
 (0)