From 1b4c6feda18ccf2b8e57f5426496110ca19a50ee Mon Sep 17 00:00:00 2001 From: Karel Zikmund Date: Wed, 20 Oct 2021 14:16:28 +0200 Subject: [PATCH 1/2] Clarify UseSocketsHttpHandler availability in versions Clarify that UseSocketsHttpHandler switch is available only on 2.1-3.1 and not 5.0+ --- xml/System.Net.Http/HttpClientHandler.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xml/System.Net.Http/HttpClientHandler.xml b/xml/System.Net.Http/HttpClientHandler.xml index 3df2c2cd3ca..edb3be71906 100644 --- a/xml/System.Net.Http/HttpClientHandler.xml +++ b/xml/System.Net.Http/HttpClientHandler.xml @@ -40,9 +40,9 @@ The `HttpClientHandler` class and classes derived from it enable developers to c ### HttpClientHandler in .NET Core -Starting in .NET Core 2.1, the implementation of the `HttpClientHandler` class was changed to be based on the cross-platform HTTP protocol stack used by the class. Prior to .NET Core 2.1, the `HttpClientHandler` class used older HTTP protocol stacks ( on Windows and `CurlHandler`, an internal class implemented on top of Linux's native libcurl component, on Linux). +Starting in .NET Core 2.1, the implementation of the `HttpClientHandler` class was changed to be based on the cross-platform HTTP protocol stack used by the class. Prior to .NET Core 2.1, the `HttpClientHandler` class used older HTTP protocol stacks ( on Windows and `CurlHandler`, an internal class implemented on top of Linux's native `libcurl` component, on Linux). -You can configure your app to use the older HTTP protocol stacks in one of the following three ways: +You can configure your app to use the older HTTP protocol stacks on .NET Core 2.1-3.1 in one of the following three ways: - Call the method: @@ -66,6 +66,8 @@ You can configure your app to use the older HTTP protocol stacks in one of the f - Define an environment variable named `DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER` and set it to either `false` or **0**. +These configuration options are not available starting with .NET 5. + ## Examples :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_Misc/system.net.http.httpclienthandler/cs/source.cs" id="Snippet1"::: From 90e1ac2326bc1f3e11e50e294c3c2c60a07e5794 Mon Sep 17 00:00:00 2001 From: Karel Zikmund Date: Thu, 21 Oct 2021 12:31:47 +0200 Subject: [PATCH 2/2] Update xml/System.Net.Http/HttpClientHandler.xml Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Net.Http/HttpClientHandler.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net.Http/HttpClientHandler.xml b/xml/System.Net.Http/HttpClientHandler.xml index edb3be71906..e4beef872a7 100644 --- a/xml/System.Net.Http/HttpClientHandler.xml +++ b/xml/System.Net.Http/HttpClientHandler.xml @@ -42,7 +42,7 @@ The `HttpClientHandler` class and classes derived from it enable developers to c Starting in .NET Core 2.1, the implementation of the `HttpClientHandler` class was changed to be based on the cross-platform HTTP protocol stack used by the class. Prior to .NET Core 2.1, the `HttpClientHandler` class used older HTTP protocol stacks ( on Windows and `CurlHandler`, an internal class implemented on top of Linux's native `libcurl` component, on Linux). -You can configure your app to use the older HTTP protocol stacks on .NET Core 2.1-3.1 in one of the following three ways: +On .NET Core 2.1 - 3.1 only, you can configure your app to use the older HTTP protocol stacks in one of the following three ways: - Call the method: