Example #1
0
        public async Task When_redirecting_to_https_the_default_should_return_no_reasonPhrase()
        {
            var client = StsClientHelper.Create(new StrictTransportSecurityOptions {
                RedirectToSecureTransport = true
            });
            var response = await client.GetAsync("http://www.example.org");

            response.ReasonPhrase.Should().BeEmpty();
        }
Example #2
0
        public async Task When_preload_is_set_it_should_be_included_in_the_response_header_value()
        {
            var client = StsClientHelper.Create(new StrictTransportSecurityOptions {
                Preload = true,
                MaxAge  = 50
            });
            var response = await client.GetAsync("https://wwww.example.org");

            response.StsHeader().Should().Contain("preload");
        }