Remove superfluous logic in 'Rocket.write_response()'.

This commit is contained in:
Sergio Benitez 2018-01-19 11:23:13 -08:00
parent d2727972fd
commit 5240f860cb
1 changed files with 0 additions and 5 deletions

View File

@ -131,11 +131,6 @@ impl Rocket {
hyp_res.headers_mut().append_raw(name, value);
}
if response.body().is_none() {
hyp_res.headers_mut().set(header::ContentLength(0));
return hyp_res.start()?.end();
}
match response.body() {
None => {
hyp_res.headers_mut().set(header::ContentLength(0));