Skip to content

Commit

Permalink
Fix SendAsync_GetWithInvalidHostHeader_ThrowsException (#72779)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzikm committed Jul 25, 2022
1 parent a1468ed commit a0cd16e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public async Task SendAsync_GetWithInvalidHostHeader_ThrowsException()
var m = new HttpRequestMessage(HttpMethod.Get, Configuration.Http.SecureRemoteEchoServer) { Version = UseVersion };
m.Headers.Host = "hostheaderthatdoesnotmatch";

using (HttpClient client = CreateHttpClient())
using (HttpClient client = CreateHttpClient(CreateHttpClientHandler(allowAllCertificates: false)))
{
await Assert.ThrowsAsync<HttpRequestException>(() => client.SendAsync(TestAsync, m));
}
Expand Down

0 comments on commit a0cd16e

Please sign in to comment.