HttpClient: Try decode Location header using UTF-8 (dotnet/corefx#37852)
authorKrzysztof Wicher <kwicher@microsoft.com>
Fri, 7 Jun 2019 21:38:02 +0000 (14:38 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2019 21:38:02 +0000 (14:38 -0700)
commita5b8971c8de356c83d6f737dd9a4508e11916052
tree156140bcba0183a209c407dcc6a5683d2dd55831
parent078767764b81859f206fb9e287d6a007f250ef38
HttpClient: Try decode Location header using UTF-8 (dotnet/corefx#37852)

* Use desktop logic for parsing Location (try decode using UTF-8)

* Tests and feedback

* fix netfx

* Convert UTF-8 in non-allocating way without try .. catch

Commit migrated from https://github.com/dotnet/corefx/commit/02026907370c57380a9f091b54ee77873f276a68
src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/HeaderDescriptor.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs