Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Streamable HTTP server answers a session-less non-initialize POST with 422, spec says 400

Đã đóng
#1,376 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@connor4312 đang làm issue này rồi.

Từ ngày 17/10/2026.

  • #1377 của @jensholdgaard — đã merge

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug P1 ready for work T-transport

🤖 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-Id header (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

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/rust-sdk

Tất cả issue của modelcontextprotocol/rust-sdk

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.