Fix for Restricted Response headers (#169)

* WebHeaderCollection.IsRestricted (#148)

* Update dependencies

* 1.0.4.7
This commit is contained in:
Stef Heyenrath
2018-07-19 22:23:00 +02:00
committed by GitHub
parent 7191c082de
commit b2bf63b013
12 changed files with 186 additions and 7 deletions

View File

@@ -585,6 +585,24 @@ namespace WireMock.Net.Tests
Check.That(response).IsEqualTo("/fooBar");
}
[Fact]
public async Task FluentMockServer_Should_exclude_restrictedResponseHeader_for_IOwinResponse()
{
_server = FluentMockServer.Start();
_server
.Given(Request.Create().WithPath("/foo").UsingGet())
.RespondWith(Response.Create().WithHeader("Keep-Alive", "").WithHeader("test", ""));
// Act
var response = await new HttpClient().GetAsync("http://localhost:" + _server.Ports[0] + "/foo");
// Assert
Check.That(response.Headers.Contains("test")).IsTrue();
Check.That(response.Headers.Contains("Keep-Alive")).IsFalse();
}
public void Dispose()
{
_server?.Stop();