Fix ProxyExplicitlyProvided_DefaultCredentials_Ignored test (dotnet/corefx#28770)
authorStephen Toub <stoub@microsoft.com>
Tue, 3 Apr 2018 16:00:59 +0000 (09:00 -0700)
committerGitHub <noreply@github.com>
Tue, 3 Apr 2018 16:00:59 +0000 (09:00 -0700)
commitfcb85a56d7b1e011ff635a362b8655cbeee8cdb7
treea0b0f6a7212190aa830932cbf6a34d20a798b51d
parentd811affffcc4da6810e412b4bf81781b50893445
Fix ProxyExplicitlyProvided_DefaultCredentials_Ignored test (dotnet/corefx#28770)

I couldn't get it to fail locally, but I believe the issue was that sporadically WinHttpHandler would not reuse the original connection, in which case it would either not close the first and the test would hang because nothing was accepting the second connection, or it would close the first and fail because the server was expecting a second request on the connection.  This fixes it by using Connection: close on the first response so that the client won't reuse the same connection.

Commit migrated from https://github.com/dotnet/corefx/commit/586cffcdfdf23ad6c193a4bf37fce88a1bf69508
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.DefaultProxyCredentials.cs