Skip to content

Commit 7722c18

Browse files
committed
Address Brennan's review feedback on aspnetcore.md
- Remove duplicate 'Thank you @kilifu' line in HTTP QUERY section. - Add UseTlsClientHelloListener snippet to the TLS section. - Split 'OpenAPI and minimal API improvements' into two sections so the endpoint-filter bullet (not OpenAPI-related) stands on its own. - Remove the agent-generated 'Filtered features' HTML comment block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 69efa67 commit 7722c18

1 file changed

Lines changed: 28 additions & 20 deletions

File tree

release-notes/11.0/preview/preview4/aspnetcore.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
- [MCP Server template ships with the .NET SDK](#mcp-server-template-ships-with-the-net-sdk)
1212
- [TLS handshake observability in Kestrel](#tls-handshake-observability-in-kestrel)
1313
- [Response compression always emits `Vary: Accept-Encoding`](#response-compression-always-emits-vary-accept-encoding)
14-
- [OpenAPI and minimal API improvements](#openapi-and-minimal-api-improvements)
14+
- [File result types appear in OpenAPI documents](#file-result-types-appear-in-openapi-documents)
15+
- [Endpoint filters observe parameter-binding failures](#endpoint-filters-observe-parameter-binding-failures)
1516
- [Smaller Blazor WebAssembly publish output](#smaller-blazor-webassembly-publish-output)
1617
- [Runtime-async enabled for shared framework libraries](#runtime-async-enabled-for-shared-framework-libraries)
1718
- [Breaking changes](#breaking-changes)
@@ -35,8 +36,6 @@ app.MapMethods("/search", ["QUERY"], (SearchRequest request) =>
3536
app.Run();
3637
```
3738

38-
Thank you [@kilifu](https://github.com/kilifu) for this contribution!
39-
4039
The method shows up in generated OpenAPI documents alongside `GET`, `POST`, and friends, so client generators and API explorers pick it up automatically.
4140

4241
Thank you [@kilifu](https://github.com/kilifu) for this contribution!
@@ -160,20 +159,41 @@ Two related changes make it easier to diagnose and customize TLS connections in
160159

161160
`ITlsHandshakeFeature` now exposes an `Exception` property containing the exception thrown during a failed TLS handshake, so middleware and logging can record why a connection failed instead of seeing a bare `IOException` further up the stack ([dotnet/aspnetcore #65807](https://github.com/dotnet/aspnetcore/pull/65807)). The feature continues to work after the handshake fails — Kestrel snapshots the relevant fields off the underlying `SslStream` before it is disposed.
162161

163-
The `TlsClientHelloBytesCallback` option on `HttpsConnectionAdapterOptions` was reworked as a connection middleware ([dotnet/aspnetcore #65808](https://github.com/dotnet/aspnetcore/pull/65808)). The previous callback shape is now obsolete; configure ClientHello inspection via the connection-builder pipeline instead.
162+
The `TlsClientHelloBytesCallback` option on `HttpsConnectionAdapterOptions` was reworked as a connection middleware ([dotnet/aspnetcore #65808](https://github.com/dotnet/aspnetcore/pull/65808)). The previous callback shape is now obsolete; configure ClientHello inspection via the new `ListenOptions.UseTlsClientHelloListener` extension instead:
163+
164+
```csharp
165+
var builder = WebApplication.CreateBuilder(args);
166+
167+
builder.WebHost.ConfigureKestrel(options =>
168+
{
169+
options.ListenAnyIP(5001, listenOptions =>
170+
{
171+
listenOptions.UseHttps();
172+
listenOptions.UseTlsClientHelloListener((connection, clientHelloBytes) =>
173+
{
174+
// Inspect the ClientHello (SNI, ALPN, etc.) for diagnostics or routing.
175+
});
176+
});
177+
});
178+
```
164179

165180
## Response compression always emits `Vary: Accept-Encoding`
166181

167182
The response-compression middleware now adds `Vary: Accept-Encoding` to every response when compression is enabled, even when the response itself isn't compressed ([dotnet/aspnetcore #55092](https://github.com/dotnet/aspnetcore/pull/55092)). This prevents shared caches and CDNs from serving a compressed payload to a client that didn't ask for one (or vice versa).
168183

169184
Thank you [@pedrobsaila](https://github.com/pedrobsaila) for this contribution!
170185

171-
## OpenAPI and minimal API improvements
186+
## File result types appear in OpenAPI documents
187+
188+
`FileStreamResult`, `FileContentHttpResult`, and `FileStreamHttpResult` are now described as binary string schemas in generated OpenAPI documents, so clients see accurate response shapes for endpoints that stream files ([dotnet/aspnetcore #64562](https://github.com/dotnet/aspnetcore/pull/64562)). Annotate the endpoint with `.Produces<FileContentHttpResult>(contentType: "application/pdf")` (or the equivalent `*StreamHttpResult`/`FileStreamResult` type) so OpenAPI sees the result type and emits the binary schema.
172189

173-
Two changes round out the minimal API + OpenAPI experience this preview:
190+
Thank you [@marcominerva](https://github.com/marcominerva) for this contribution!
174191

175-
- **File result types appear in OpenAPI documents.** `FileStreamResult`, `FileContentHttpResult`, and `FileStreamHttpResult` are now described as binary string schemas in generated OpenAPI documents, so clients see accurate response shapes for endpoints that stream files ([dotnet/aspnetcore #64562](https://github.com/dotnet/aspnetcore/pull/64562)). Annotate the endpoint with `.Produces<FileContentHttpResult>(contentType: "application/pdf")` (or the equivalent `*StreamHttpResult`/`FileStreamResult` type) so OpenAPI sees the result type and emits the binary schema. Thank you [@marcominerva](https://github.com/marcominerva) for this contribution!
176-
- **Endpoint filters can observe parameter-binding failures.** When a minimal API endpoint has any filters or filter factories configured, the filter pipeline now runs even if parameter binding fails. Filters can read `HttpContext.Response.StatusCode == 400` and substitute their own response body. Endpoints without filters continue to short-circuit with a 400 as before ([dotnet/aspnetcore #64539](https://github.com/dotnet/aspnetcore/pull/64539)). In Development, set `RouteHandlerOptions.ThrowOnBadRequest = false` so the framework returns a 400 the filter can observe instead of throwing `BadHttpRequestException` to the developer exception page. Thank you [@marcominerva](https://github.com/marcominerva) for this contribution!
192+
## Endpoint filters observe parameter-binding failures
193+
194+
When a minimal API endpoint has any filters or filter factories configured, the filter pipeline now runs even if parameter binding fails ([dotnet/aspnetcore #64539](https://github.com/dotnet/aspnetcore/pull/64539)). Filters can read `HttpContext.Response.StatusCode == 400` and substitute their own response body. Endpoints without filters continue to short-circuit with a 400 as before. In Development, set `RouteHandlerOptions.ThrowOnBadRequest = false` so the framework returns a 400 the filter can observe instead of throwing `BadHttpRequestException` to the developer exception page.
195+
196+
Thank you [@marcominerva](https://github.com/marcominerva) for this contribution!
177197

178198
## Smaller Blazor WebAssembly publish output
179199

@@ -197,18 +217,6 @@ Because runtime-async changes how `async`/`await` is generated for a large porti
197217
- **`%2F` is preserved in HTTP/1.1 absolute-form request targets.** Previously, a request like `GET http://host/a%2Fb` was decoded to a path of `/a/b`, while `GET /a%2Fb` (origin-form) preserved the encoded slash. Both forms now resolve to `/a%2Fb`. Apps that depended on the inconsistent absolute-form behavior should update their routing or middleware to expect the encoded segment ([dotnet/aspnetcore #65930](https://github.com/dotnet/aspnetcore/pull/65930)).
198218
- **`HttpsConnectionAdapterOptions.TlsClientHelloBytesCallback` is obsolete.** Use the new connection middleware shape introduced in [dotnet/aspnetcore #65808](https://github.com/dotnet/aspnetcore/pull/65808). The property continues to work in 11.0 but produces an obsoletion warning.
199219

200-
<!-- Filtered features (significant engineering work, but too niche or off-product for ASP.NET Core release notes):
201-
- IConnectionEndPointFeature implemented in Kestrel/HttpSys/IIS (#62162): plumbing for diagnostics features that don't have a user-facing surface this preview.
202-
- StaticAssetDescriptor.Order from manifest (#65975): SDK-side enabler for SPA fallback ordering; the user-visible story will land with the companion SDK change.
203-
- SignalR extra backpressure timeout (#66318): internal hardening, no public API or scenario story for end users.
204-
- Razor warning waves infrastructure (dotnet/razor #13016): plumbing only, no new warnings yet — not independently useful.
205-
- Razor IR/refactor PRs (#13002, #13003, #13004, #13005, #13007, #13008, #13053): compiler internals with no user-visible change.
206-
- Razor editor/IDE fixes (#13017, #13023, #13035, #13043, #13044, #13057, #13063, #13065): tooling/IDE work — product-boundary rule excludes these from ASP.NET Core product notes.
207-
- "Detach methods when disconnection confirmed" (#66275) and resource-collection gzip footer (#66242): rolled into Bug fixes.
208-
- Blazor Web Worker template renames and clean-up (#66070, #66261): rolled into Bug fixes / templates section.
209-
- Numerous infra / dependency / loc / agentic-workflow / source-build PRs: pre-filtered (~69 entries) before scoring.
210-
-->
211-
212220
## Bug fixes
213221

214222
- **Blazor**

0 commit comments

Comments
 (0)