Fix flaky 400 response tests (#1758)

This commit is contained in:
Stephen Halter 2017-04-24 23:48:47 -07:00 committed by GitHub
parent e3e78bc461
commit a4def946a6
1 changed files with 14 additions and 2 deletions

View File

@ -123,7 +123,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
"",
"1");
await connection.Receive("HTTP/1.1 400 Bad Request");
await connection.ReceiveForcedEnd(
"HTTP/1.1 400 Bad Request",
"Connection: close",
$"Date: {server.Context.DateHeaderValue}",
"Content-Length: 0",
"",
"");
}
}
@ -167,7 +173,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
"Connection: Upgrade",
"",
"");
await connection.Receive("HTTP/1.1 400 Bad Request");
await connection.ReceiveForcedEnd(
"HTTP/1.1 400 Bad Request",
"Connection: close",
$"Date: {server.Context.DateHeaderValue}",
"Content-Length: 0",
"",
"");
}
}
}