Respond to invalid requests with '400 Bad Request'.

Resolves #465.
This commit is contained in:
Max Furman 2017-12-27 22:06:57 -05:00 committed by Sergio Benitez
parent 0101d8bf3a
commit 4be75accf7
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ impl hyper::Handler for Rocket {
Err(e) => {
error!("Bad incoming request: {}", e);
let dummy = Request::new(self, Method::Get, Uri::new("<unknown>"));
let r = self.handle_error(Status::InternalServerError, &dummy);
let r = self.handle_error(Status::BadRequest, &dummy);
return self.issue_response(r, res);
}
};