feat(body): add Sender::abort

This allows a client or server to indicate that the body should be cut off
in an abnormal fashion so the server doesn't simply get a "valid" but
truncated body.
This commit is contained in:
Steven Fackler
2018-06-05 17:09:31 -07:00
committed by Sean McArthur
parent 1e3bc6bf1a
commit a096799c1b
3 changed files with 71 additions and 14 deletions

View File

@@ -265,7 +265,7 @@ impl StdError for Error {
Kind::NewService => "calling user's new_service failed",
Kind::Service => "error from user's server service",
Kind::Body => "error reading a body from connection",
Kind::BodyWrite => "error write a body to connection",
Kind::BodyWrite => "error writing a body to connection",
Kind::BodyUser => "error from user's Payload stream",
Kind::Shutdown => "error shutting down connection",
Kind::Http2 => "http2 general error",