Changing chunked with exception test criteria
This commit is contained in:
parent
52dc37eae7
commit
7917569466
|
|
@ -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",
|
||||
"",
|
||||
"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue