Streamable HTTP server answers a session-less non-initialize POST with 422, spec says 400
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
🤖 AI-generated issue, prepared with Claude Code and reviewed by the submitter.
In legacy session mode, StreamableHttpService answers a POST that has no Mcp-Session-Id header and is not initialize with 422 Unprocessable Entity (Unexpected message, expect initialize request). GET and DELETE in the same situation already return 400 Bad Request (Bad Request: Session ID is required).
The Streamable HTTP transport's Session Management section (2025-11-25, same wording in 2025-06-18) says:
Servers that require a session ID SHOULD respond to requests without an
MCP-Session-Idheader (other than initialization) with HTTP 400 Bad Request.
How it showed up: a client reconnecting after the server reaped an idle session got 404 for its stale session id, as expected, then 422 for its next session-less request before re-initializing.
Where: crates/rmcp/src/transport/streamable_http_server/tower.rs, the two session-less POST branches that return unexpected_message_response("initialize request") from transport/common/server_side_http.rs.
I have a small fix ready that returns the same 400 response GET and DELETE use, with a regression test, and will open it as a PR linked to this issue.
- Ngôn ngữ chính
- Rust
- Star
- 4k
- Fork
- 662
- Merge trung bình
- 3 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusCó thể đã có người làm @aton-of-data đã nhận 7 ngày trước. Đang mởbug P2 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/rust-sdk#1339 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeCó thể đã có người làm @jstar0 đã nhận 10 ngày trước. Đang mởbug P1 ready for work T-security T-transport
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
modelcontextprotocol/rust-sdk#1330 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
P3 question Stale T-documentation T-enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
modelcontextprotocol/rust-sdk#1155 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
outputSchema is generated for the deserialize contract; tool results are serialisedCó thể đã có người làm @connor4312 đã nhận 2 ngày trước. Đang mởbug P2 ready for work T-handler
modelcontextprotocol/rust-sdk#1374 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Streamable HTTP client: update the stored endpoint URI after a 308Có thể đã có người làm @connor4312 đã nhận 2 ngày trước. Đang mởenhancement P3 T-transport
modelcontextprotocol/rust-sdk#1373 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của modelcontextprotocol/rust-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
yologdev/yoyo-evolve#1053 ·
-
bug lompi security sev-9
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
area:config area:security bug good first issue platform:linux platform:windows priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rtk-ai/rtk#4651 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
niravpatidar37/mcpsum#80 ·
Maintainer thường phản hồi trong vòng 1 ngày