Skip to content

Document WinHttpHandler trailer support #11197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions xml/System.Net.Http/WinHttpHandler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ This class is also available for use in Desktop apps by installing it as a NuGet

Starting in .NET 5, <xref:System.Net.Http.WinHttpHandler> is no longer included in the *System.Net.Http.dll* assembly as part of the .NET runtime. For more information, see [WinHttpHandler removed from .NET runtime](/dotnet/core/compatibility/3.1-5.0#winhttphandler-removed-from-net-runtime).

### Trailing headers

Starting with version 6.0.0, <xref:System.Net.Http.WinHttpHandler> supports trailing headers, also known as trailers ([RFC 7230 - 4.1.2. Chunked Trailer Part](https://tools.ietf.org/html/rfc7230#section-4.1.2)).

- On .NET Standard 2.1 and .NET 8 or later, trailers are added to <xref:System.Net.Http.HttpResponseMessage.TrailingHeaders>.
- On .NET Framework, trailers are added to a well-known property in <xref:System.Net.Http.HttpRequestMessage.Properties?displayProperty=nameWithType> on the request object corresponding to the response (<xref:System.Net.Http.HttpResponseMessage.RequestMessage?displayProperty=nameWithType>). The name of the property is `__ResponseTrailers`, the type of the property value is <xref:System.Net.Http.Headers.HttpHeaders>.

Trailer support is implemented via the `WINHTTP_QUERY_FLAG_TRAILERS` [Query Info Flag](/windows/win32/winhttp/query-info-flags) which has been introduced in Windows 11, version 21H2 (10.0; Build 22000). On Windows systems where `WINHTTP_QUERY_FLAG_TRAILERS` is unsupported, trailers are ignored.

]]></format>
</remarks>
</Docs>
Expand Down