Current user identity in added to HttpConnectionKey (#303)
authorAlexander Nikolaev <55398552+alnikola@users.noreply.github.com>
Mon, 2 Dec 2019 14:15:43 +0000 (15:15 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Dec 2019 14:15:43 +0000 (15:15 +0100)
commit3cec4f50af9fc68bcde80952427092f7a8873864
tree1df2e517281cd90eff441fceed44f3cc75a3c678
parent6afe96cc2e950379d13a87efa1fa5a651cbce9bd
Current user identity in added to HttpConnectionKey (#303)

On retrieving a connection from a pool, HttpConnectionPoolManager adds the current user identity to the HttpConnectionKey for direct and proxy connections when the default credentials is used on Windows platform. Since on Unix there is not the concept of a user identity on the thread, the identity component in the key is always set to string.Empty.

Fixes dotnet/corefx#39621
src/libraries/System.Net.Http/src/System.Net.Http.csproj
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CurrentUserIdentityProvider.Unix.cs [new file with mode: 0644]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CurrentUserIdentityProvider.Windows.cs [new file with mode: 0644]
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpConnectionKeyTest.cs [new file with mode: 0644]
src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj