chore(error): improve message about incomplete parsed messages

This commit is contained in:
Sean McArthur
2018-06-25 17:29:40 -07:00
parent 1156e17e65
commit 1f95f58837
2 changed files with 2 additions and 2 deletions

View File

@@ -296,7 +296,7 @@ impl StdError for Error {
Kind::Parse(Parse::Header) => "invalid Header provided", Kind::Parse(Parse::Header) => "invalid Header provided",
Kind::Parse(Parse::TooLarge) => "message head is too large", Kind::Parse(Parse::TooLarge) => "message head is too large",
Kind::Parse(Parse::Status) => "invalid Status provided", Kind::Parse(Parse::Status) => "invalid Status provided",
Kind::Incomplete => "message is incomplete", Kind::Incomplete => "parsed HTTP message from remote is incomplete",
Kind::MismatchedResponse => "response received without matching request", Kind::MismatchedResponse => "response received without matching request",
Kind::Closed => "connection closed", Kind::Closed => "connection closed",
Kind::Connect => "an error occurred trying to connect", Kind::Connect => "an error occurred trying to connect",

View File

@@ -518,7 +518,7 @@ test! {
url: "http://{addr}/err", url: "http://{addr}/err",
headers: {}, headers: {},
body: None, body: None,
error: |err| err.to_string() == "message is incomplete", error: |err| err.to_string() == "parsed HTTP message from remote is incomplete",
} }
test! { test! {