fix(server): prevent to output Transfer-encoding when server upgrade (#1465)

This commit is contained in:
Yusuke Sasaki
2018-03-20 02:27:54 +09:00
committed by Sean McArthur
parent 91b9700862
commit eb10567927

View File

@@ -214,6 +214,7 @@ impl Server<()> {
match head.subject {
// TODO: support for 1xx codes needs improvement everywhere
// would be 100...199 => false
StatusCode::SwitchingProtocols |
StatusCode::NoContent |
StatusCode::NotModified => false,
_ => true,