public async Task On_redirect_strips_authorization_header()
{
using (var client = new HttpClient(_handler)
{
BaseAddress = new Uri("http://localhost")
})
{
client.DefaultRequestHeaders.Authorization = AuthenticationHeaderValue.Parse("foo");
var response = await client.GetAsync("/redirect-301-absolute");
response.StatusCode.ShouldBe(HttpStatusCode.OK);
response.RequestMessage.Headers.Authorization.ShouldBeNull();
}
}