diff --git a/test/Microsoft.AspNet.Server.KestrelTests/ChunkedResponseTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/ChunkedResponseTests.cs index 162a29263a..f7e4898cad 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/ChunkedResponseTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/ChunkedResponseTests.cs @@ -146,8 +146,12 @@ namespace Microsoft.AspNet.Server.KestrelTests "", ""); - // Nothing (not even headers) are written, but the connection is closed. - await connection.ReceiveEnd(); + // Headers are sent before connection is closed, but chunked body terminator isn't sent + await connection.ReceiveEnd( + "HTTP/1.1 200 OK", + "Transfer-Encoding: chunked", + "", + ""); } } } diff --git a/test/Microsoft.AspNet.Server.KestrelTests/TestConnection.cs b/test/Microsoft.AspNet.Server.KestrelTests/TestConnection.cs index 4afd1628d9..773bddf70d 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/TestConnection.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/TestConnection.cs @@ -119,9 +119,10 @@ namespace Microsoft.AspNet.Server.KestrelTests public async Task ReceiveEnd(params string[] lines) { await Receive(lines); - var ch = new char[1]; - var count = await _reader.ReadAsync(ch, 0, 1); - Assert.Equal(0, count); + var ch = new char[128]; + var count = await _reader.ReadAsync(ch, 0, 128); + var text = new string(ch, 0, count); + Assert.Equal("", text); } } } \ No newline at end of file