v11 update: Kestrel applies trailer header timeouts
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- documentation
Direzione di ricerca
Inizia da fundamentals/servers/kestrel/options.md, nella sezione “Request headers timeout”, e verifica i casi referenziati in Http2TimeoutTests.cs e Http3TimeoutTests.cs per il comportamento documentato. Aggiungi la nota specifica per la versione .NET 11, mantieni il bilanciamento dei moniker circostanti e verifica che la nota venga sottoposta a rendering solo per la versione 11.0 e successive, senza avvisi di build.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Target repository: dotnet/AspNetCore.Docs
Analyzed at commit: 4986136881f2bbf1879f10106467769df5a49932
Product source verified at: dotnet/aspnetcore @ 1fcd7ef305697a1888f3ede076010350ae9f4f8d
Source release note: Kestrel applies trailer header timeouts
🎯 Goal
KestrelServerLimits.RequestHeadersTimeout is documented in fundamentals/servers/kestrel/options.md, but the article describes only its original scope — the initial request headers. In .NET 11 the same timeout now also bounds trailing headers (trailers) on HTTP/2 and HTTP/3, closing a hole where a client could start a trailer HEADERS frame and stall indefinitely. Add a version-scoped note to the existing "Request headers timeout" section.
This is a behavior change on an existing option with no new API (RequestHeadersTimeout already existed), so the element below names the prior behavior.
✅ Coverage status summary
Legend: ✅ already documented · ✏️ update needed · 🟣 could not determine
| # | Feature element from What's New | Status | Where |
|---|---|---|---|
| 1 | KestrelServerLimits.RequestHeadersTimeout exists and bounds time spent receiving request headers |
✅ | fundamentals/servers/kestrel/options.md L82–L88 |
| 2 | In .NET 11, RequestHeadersTimeout also applies to trailing headers (trailers) on HTTP/2 and HTTP/3 — a partially-sent trailer HEADERS frame now resets the request when the timeout elapses |
✏️ | 1. Update — after options.md L88 |
| 3 | Prior behavior (element 2's contrast): the timeout covered only the initial request headers; a stalled or incomplete trailer frame wasn't bounded by it | ✏️ | Same insertion |
🔢 Version applicability
Applies to: CURRENT-ONLY
Target moniker: >= aspnetcore-11.0
Earlier versions affected: None — the extension to trailer HEADERS frames ships in .NET 11. The RequestHeadersTimeout option itself predates it and stays documented for all supported versions.
| Article | monikerRange |
Moniker state |
|---|---|---|
fundamentals/servers/kestrel/options.md |
(no front-matter monikerRange; article is zoned inline) |
State D — the "Request headers timeout" section sits inside a :::moniker range=">= aspnetcore-6.0" zone spanning L14–L181. Adding an 11.0-only note requires the four-directive split: close >= aspnetcore-6.0, open >= aspnetcore-11.0, add the note, close it, reopen >= aspnetcore-6.0. |
The insertion point is not inside any # [Tab](#tab/...) group, so no tab-nesting hazard applies.
📋 Coverage gap summary
An operator tuning Kestrel timeouts reads the "Request headers timeout" section and reasonably concludes the timeout guards header receipt at the start of a request. On HTTP/2 and HTTP/3, a request can also carry trailers — a second HEADERS frame after the body — and before .NET 11 that frame wasn't covered by any header timeout, so a client that opened a trailer frame and then stalled tied up the request. .NET 11 extends RequestHeadersTimeout to cover trailer HEADERS too. Nothing in the current section tells the reader this, so someone reasoning about slow-loris-style resource exhaustion via trailers gets an incomplete picture.
Feature announced in What's New:
Kestrel now applies the request headers timeout to trailing headers on HTTP/2 and HTTP/3 connections. Previously the
RequestHeadersTimeoutlimit applied only to a request's initial headers, so a client that started sending a trailingHEADERSframe without finishing it wasn't bounded by the timeout.
Product source confirms the behavior via Kestrel's timeout tests:
Http2TimeoutTests.csL1002–L1054 — a fragmented trailerHEADERSframe armsRequestHeadersTimeout; when the timeout elapses the request is reset.Http3TimeoutTests.csL733–L784 — the equivalent assertion for HTTP/3.
Breaking change: No dedicated breaking-change article. It's a hardening change; a client depending on unbounded trailer time would be affected, but that isn't a supported expectation. Worth a one-line "behavior change" flag in the note.
📁 Affected files
| Item | Path | Lines | Section |
|---|---|---|---|
| 1. | fundamentals/servers/kestrel/options.md |
after 88 | "Request headers timeout" |
Target article uids: fundamentals/servers/kestrel/options
📝 Proposed changes
✏️ 1. Update — options.md, add a >= aspnetcore-11.0 trailer-timeout note (State D split)
Applies to: >= aspnetcore-11.0
Location: Lines 82–90 — after the "This timeout is not enforced when a debugger is attached" paragraph (L88) and before the ## HTTP/2 limits heading (L90), inside the >= aspnetcore-6.0 zone (L14–L181).
Before (lines 82–90):
### Request headers timeout
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerLimits.RequestHeadersTimeout> gets or sets the maximum amount of time the server spends receiving request headers:
:::code language="csharp" source="samples/6.x/KestrelSample/Snippets/Program.cs" id="snippet_ConfigureKestrelLimitsRequestHeadersTimeout" highlight="3":::
This timeout is not enforced when a debugger is attached to the Kestrel process.
## HTTP/2 limits
After:
### Request headers timeout
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerLimits.RequestHeadersTimeout> gets or sets the maximum amount of time the server spends receiving request headers:
:::code language="csharp" source="samples/6.x/KestrelSample/Snippets/Program.cs" id="snippet_ConfigureKestrelLimitsRequestHeadersTimeout" highlight="3":::
This timeout is not enforced when a debugger is attached to the Kestrel process.
:::moniker-end
:::moniker range=">= aspnetcore-11.0"
> [!NOTE]
> In .NET 11 and later, `RequestHeadersTimeout` also bounds **trailing headers** (trailers) on HTTP/2 and HTTP/3 requests. If a client begins a trailer `HEADERS` frame but doesn't finish it within the timeout, Kestrel resets the request. In earlier versions the timeout applied only to a request's initial headers, so a stalled or partial trailer frame wasn't bounded by it.
:::moniker-end
:::moniker range=">= aspnetcore-6.0"
## HTTP/2 limits
Rationale: The existing description of RequestHeadersTimeout is accurate for all versions and stays put. The .NET 11 scope extension is additive and version-specific, so it's a >= aspnetcore-11.0 note added via a four-directive split within the surrounding 6.0 zone.
✅ 2. Update — TOC
No TOC change required. The edit adds a note to an existing article.
✅ Action plan
- Confirm element 1 (
RequestHeadersTimeoutdoc at L82–L88) — already accurate. - Apply change 1 as a State D four-directive split; verify the
>= aspnetcore-6.0zone that opened at L14 still closes exactly once at L181 (net-zero balance). - Confirm the note renders only under 11.0 and the
## HTTP/2 limitsheading remains in the 6.0 zone. - Resolve any build warnings.
⚠️ Review considerations
- No other issue in this .NET 11 coverage sweep edits this file, so the State D split is standalone (combined balance = existing + 0).
- Wording of "trailing headers." The product term is trailers / trailer
HEADERSframe. The note uses both "trailing headers (trailers)" on first mention for searchability, then "trailerHEADERSframe" for precision. - 🟣 Is a metrics/observability note warranted? A reset request may surface in Kestrel connection metrics; if the docs team wants, the metrics article could note trailer-timeout resets. Discretionary, not proposed here.
🔗 References
- What's New section: Kestrel applies trailer header timeouts
- Docset target (✏️):
fundamentals/servers/kestrel/options.mdL82–L90 - Product source:
Http2TimeoutTests.csL1002–L1054,Http3TimeoutTests.csL733–L784 — trailerHEADERSarmsRequestHeadersTimeout.
- Lingua principale
- C#
- Stelle
- 13.1k
- Fork
- 24.6k
- Merge medio
- 1g 8h
- PR unite (30g)
- 117
Preparare l'ambiente
- 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 dotnet/AspNetCore.Docs
-
v11 update: TLS channel binding token access from ITlsConnectionFeatureForse già presa @guardrex l’ha presa 10 giorni fa. Aperta11.0 fundamentals/subsvc security/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
dotnet/AspNetCore.Docs#37726 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
v11 update: Accurate rate-limiting Retry-After headersForse già presa @guardrex l’ha presa 6 giorni fa. Aperta11.0 performance/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
dotnet/AspNetCore.Docs#37724 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
v11 update: TLS handshake observability in KestrelForse già presa @guardrex l’ha presa 3 giorni fa. Aperta11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37722 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
v11 update: Native OpenTelemetry tracing for ASP.NET CoreForse già presa @guardrex l’ha presa 3 giorni fa. Aperta11.0 fundamentals/subsvc
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37721 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
v11 update: Auto-trust development certificates in WSLForse già presa @guardrex l’ha presa 3 giorni fa. Aperta11.0 security/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
dotnet/AspNetCore.Docs#37720 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/AspNetCore.Docs
Issue simili
-
type/automation type/tech-debt
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
High-DPI fixes for release/1.3: editor toolbar icons and Color Picker layout (patch included)Apertano-stack-trace
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
v9 review: TestingApertadocs/external squad/utforming
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Altinn/altinn-studio#21041 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
stryker-mutator/stryker-net#3892 ·
I maintainer di solito rispondono entro 1 giorno