reqwest Streamable HTTP client matches response Content-Type by case-sensitive prefix
Mantenedores costumam responder em até 2 dias
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 4.1k
- Forks
- 694
- Merge médio
- 3d 14h
- PRs com merge (30d)
- 39
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de modelcontextprotocol/rust-sdk
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeTalvez já em andamento @jstar0 assumiu há 24 dias. Abertabug P1 ready for work T-security T-transport
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
modelcontextprotocol/rust-sdk#1330 ·
Mantenedores costumam responder em até 2 dias
-
OAuth discovery drops explicit default ports from advertised issuer identifiersTalvez já em andamento @gocamille assumiu há 1 dia. Abertabug P1 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1420 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
`register_client` drops `client_secret_expires_at` from the registration responseTalvez já em andamento @gocamille assumiu há 3 dias. Abertabug P2 ready for work T-security
modelcontextprotocol/rust-sdk#1416 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
Typed client calls drop the parse error when a reply misses a required fieldTalvez já em andamento @gocamille assumiu há 3 dias. Abertaenhancement P2 ready for work T-core T-service
modelcontextprotocol/rust-sdk#1415 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
Return merged cache hints from list_all_* client methodsTalvez já em andamento @gocamille assumiu há 3 dias. Abertaenhancement P2 ready for work T-service
modelcontextprotocol/rust-sdk#1411 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 2 dias
Todas as issues de modelcontextprotocol/rust-sdk
Issues semelhantes
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 70/100
OpenZeppelin/openzeppelin-relayer#967 ·
Mantenedores costumam responder em até 1 dia
-
DecisionOutcome::label() / n_dosed(): engine-side mapping so downstream needs no wildcard armAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
src/runs.rs:1987: a missing --source-run-id now answers 400 "Source run ... does not exist", not 404Abertanightly-audit
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
antithesishq/snouty#602 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
libnativeapi/nativeapi#21 ·