reqwest Streamable HTTP client matches response Content-Type by case-sensitive prefix
I maintainer di solito rispondono entro 2 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
The reqwest Streamable HTTP client checks response Content-Type using case-sensitive byte prefixes. This is the client-response counterpart of #1381; #1382 changes server request validation only.
On upstream 2a401c4, a local axum listener returning valid JSON-RPC or SSE payloads shows:
- POST
Application/JSONandText/Event-Streamare rejected, although media types are case-insensitive. - POST
application/jsonx,application/json-seqandtext/event-streamingare admitted as JSON/SSE rather than rejected as different types. - GET has the same case/prefix issue, including admitting comma-joined Content-Type values.
- A POST 503 carrying
Application/JSONand a valid JSON-RPC error returns opaque HTTP metadata rather than preserving that error. The newly merged 429 body-free behavior is unaffected.
RFC 9110 section 8.3.1 defines case-insensitive type/subtype names; parameters do not change the media-type essence.
Reproduction and proposed scope
I added 22 source-module tests using real axum listeners and the reqwest StreamableHttpClient methods: 12 fail on unchanged upstream, while 10 controls pass. They exercise GET, POST JSON/SSE, parameters, absent headers, suffix/list rejection and HTTP error classification.
A narrow fix can share a private exact, ASCII-case-insensitive essence matcher across the existing reqwest GET admission, POST response dispatch and JSON error classification. It would preserve the current accepted media types, parameter tolerance and 429 policy, with no dependency or API changes. The Unix-socket backend is outside this reqwest-specific proposal.
Opening this discussion before a draft implementation PR, per CONTRIBUTING. Feedback on this scope is welcome; no maintainer approval is assumed. Investigation and tests used Codex assistance.
- Lingua principale
- Rust
- Stelle
- 4.1k
- Fork
- 694
- Merge medio
- 3g 14h
- PR unite (30g)
- 39
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/rust-sdk
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeForse già presa @jstar0 l’ha presa 24 giorni fa. Apertabug P1 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
modelcontextprotocol/rust-sdk#1330 ·
I maintainer di solito rispondono entro 2 giorni
-
OAuth discovery drops explicit default ports from advertised issuer identifiersForse già presa @gocamille l’ha presa 1 giorno fa. Apertabug P1 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1420 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
`register_client` drops `client_secret_expires_at` from the registration responseForse già presa @gocamille l’ha presa 3 giorni fa. Apertabug P2 ready for work T-security
modelcontextprotocol/rust-sdk#1416 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Typed client calls drop the parse error when a reply misses a required fieldForse già presa @gocamille l’ha presa 3 giorni fa. Apertaenhancement P2 ready for work T-core T-service
modelcontextprotocol/rust-sdk#1415 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Return merged cache hints from list_all_* client methodsForse già presa @gocamille l’ha presa 3 giorni fa. Apertaenhancement P2 ready for work T-service
modelcontextprotocol/rust-sdk#1411 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di modelcontextprotocol/rust-sdk
Issue simili
-
example
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rust-lang-nursery/rust-cookbook#954 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 70/100
OpenZeppelin/openzeppelin-relayer#967 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
DecisionOutcome::label() / n_dosed(): engine-side mapping so downstream needs no wildcard armAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
src/runs.rs:1987: a missing --source-run-id now answers 400 "Source run ... does not exist", not 404Apertanightly-audit
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
antithesishq/snouty#602 ·
I maintainer di solito rispondono entro 1 giorno