From 7e379310877c56e950560c13027328acd6c5f882 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Tue, 15 Apr 2025 02:21:59 +0200 Subject: [PATCH 1/2] Document WinHttpHandler trailer support --- xml/System.Net.Http/WinHttpHandler.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xml/System.Net.Http/WinHttpHandler.xml b/xml/System.Net.Http/WinHttpHandler.xml index 318523207c0..6d3e0b0e700 100644 --- a/xml/System.Net.Http/WinHttpHandler.xml +++ b/xml/System.Net.Http/WinHttpHandler.xml @@ -55,6 +55,15 @@ This class is also available for use in Desktop apps by installing it as a NuGet Starting in .NET 5, 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, 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 . +- On .NET Framework, trailers are added to a well-known property in . The name of the property is `__ResponseTrailers`, the type of the property value is . + +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. + ]]> From c49c7150b8788e30cef53ce6d99745845f8d9858 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Wed, 23 Apr 2025 00:20:37 +0200 Subject: [PATCH 2/2] fix --- xml/System.Net.Http/WinHttpHandler.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net.Http/WinHttpHandler.xml b/xml/System.Net.Http/WinHttpHandler.xml index 6d3e0b0e700..13d3f0dfc25 100644 --- a/xml/System.Net.Http/WinHttpHandler.xml +++ b/xml/System.Net.Http/WinHttpHandler.xml @@ -60,7 +60,7 @@ Starting in .NET 5, is no longer included Starting with version 6.0.0, 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 . -- On .NET Framework, trailers are added to a well-known property in . The name of the property is `__ResponseTrailers`, the type of the property value is . +- On .NET Framework, trailers are added to a well-known property in on the request object corresponding to the response (). The name of the property is `__ResponseTrailers`, the type of the property value is . 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.