Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#1,376 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@connor4312 ci sta già lavorando.

Dal 17/10/2026.

  • #1377 di @jensholdgaard — integrata

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Rust
Stelle
4k
Fork
662
Merge medio
3g 13h
PR unite (30g)
35

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/rust-sdk

Tutte le issue di modelcontextprotocol/rust-sdk

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.