Skip to content

Commit 7261194

Browse files
authored
Merge pull request #102 from jbr/add-unsupported-version-number-to-debug-message
include the unsupported http version number in the ensure message
2 parents 059dff8 + 0300719 commit 7261194

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/server/decode.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ where
6262

6363
let version = httparse_req.version;
6464
let version = version.ok_or_else(|| format_err!("No version found"))?;
65-
ensure_eq!(version, HTTP_1_1_VERSION, "Unsupported HTTP version");
65+
66+
ensure_eq!(
67+
version,
68+
HTTP_1_1_VERSION,
69+
"Unsupported HTTP version 1.{}",
70+
version
71+
);
6672

6773
let mut req = Request::new(
6874
Method::from_str(method)?,

0 commit comments

Comments
 (0)