Expose HTTP response trailers on RestResponse
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- api, backend-api-design
Direzione di ricerca
Start by locating RestResponseBase and the execution path that consumes HttpResponseMessage content. Check target-framework differences around HttpResponseMessage.TrailingHeaders, then review existing response-header tests. Done means exposing a separate TrailingHeaders collection, populating it after body completion where supported, leaving it empty elsewhere, and verifying trailers remain separate from regular headers.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
.NET exposes HTTP response trailer fields through HttpResponseMessage.TrailingHeaders, but RestSharp currently maps only the regular response headers and content headers to RestResponse. The internal HttpResponseMessage is disposed after execution, so callers using the standard ExecuteAsync path cannot access trailer fields.
Trailer fields are useful for message integrity checks, signatures, delivery metrics, and post-processing status information. RFC 9110 also recommends storing them separately from the initial header section.
Proposed change
- Add a TrailingHeaders collection to RestResponseBase, separate from Headers and ContentHeaders.
- Populate it after the response body has been fully consumed, because .NET exposes received trailers only after content completion.
- Keep the collection empty on target frameworks where HttpResponseMessage.TrailingHeaders is unavailable.
- Add tests verifying that trailers are preserved and remain separate from regular headers.
Compatibility
This would be an additive public API change. RestSharp targets
etstandard2.0, .NET Framework, and modern .NET, so the property can be available on all targets while population is guarded for supported modern .NET targets.
- Lingua principale
- C#
- Stelle
- 9.8k
- Fork
- 2.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un 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 restsharp/RestSharp
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
-
delete 940Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
-
js/calculator.jsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
-
index.htmlAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
Tutte le issue di restsharp/RestSharp
Issue simili
-
[Bug]: Missing extensions in Agent Card capabilities in v0.3 compat modeForse già presa @hwanders l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
a2aproject/a2a-dotnet#514 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
agentic-workflows untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
VS Code
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
AlamoEngine-Tools/pg-starwarsgame-lsp#207 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
elsa-workflows/elsa-core#8593 ·
I maintainer di solito rispondono entro 1 giorno
-
GpioController.QueryComponentInformation() throws NotSupportedException with RaspberryPi3DriverApertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100