SocketHttpHandler: include host+IP information in HttpRequestException (#38131)
authorAnton Firszov <Anton.Firszov@microsoft.com>
Wed, 8 Jul 2020 17:34:05 +0000 (19:34 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2020 17:34:05 +0000 (19:34 +0200)
commit80e954f487500de665a678992e9b635ed2b4d63b
tree3d720fb4652f005654f547d5b0806776e72dfff4
parent5eb4ccb4a68079288a91a9664c44f3f74d1c9030
SocketHttpHandler: include host+IP information in HttpRequestException (#38131)

Fix #1326 by appending host:port info to HttpRequestException's message when connection fails.

Didn't change the inner SocketException, since it would require subclassing SocketException, which would add unnecessary complexity here.
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs