HttpWebRequest caches HttpClient in simple cases (dotnet/corefx#41462)
authorAlexander Nikolaev <55398552+alnikola@users.noreply.github.com>
Tue, 8 Oct 2019 09:22:15 +0000 (11:22 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2019 09:22:15 +0000 (11:22 +0200)
commite63b895c1fa93848b2f696558d3a75f02fd7a67d
treeaa342ee13130ccb82f78fcfd220bb528878a6c57
parent3a6a13d37fc5f6d02604fa9bfa68314938bd088f
HttpWebRequest caches HttpClient in simple cases (dotnet/corefx#41462)

HttpWebRequest caches and tries to reuse a single static HttpClient instance when it's safe to share the same instance among concurrent requests with the given parameters.
Fixes dotnet/corefx#15460

Commit migrated from https://github.com/dotnet/corefx/commit/95e35e10d7c52a7eea38c2ae6402d29e2a01efc6
src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs
src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs