chore(error): add specific user error for responding with 1xx status code

This commit is contained in:
Sean McArthur
2018-06-25 17:16:09 -07:00
parent 91b08d09e4
commit 1156e17e65
2 changed files with 9 additions and 6 deletions

View File

@@ -212,8 +212,7 @@ impl Http1Transaction for Server {
*msg.head = MessageHead::default();
msg.head.subject = StatusCode::INTERNAL_SERVER_ERROR;
msg.body = None;
//TODO: change this to a more descriptive error than just a parse error
(Err(::Error::new_status()), true)
(Err(::Error::new_user_unsupported_status_code()), true)
} else {
(Ok(()), !msg.keep_alive)
};