H2 headers must be lower case

This commit is contained in:
Carl Lerche
2017-08-25 11:44:19 -07:00
parent 91aa1db2ff
commit 9d45255c75
8 changed files with 41 additions and 28 deletions

View File

@@ -1,3 +1,4 @@
use http;
use std::{error, fmt, io};
/// The error type for HTTP/2 operations
@@ -162,6 +163,13 @@ impl From<ConnectionError> for io::Error {
}
}
impl From<http::Error> for ConnectionError {
fn from(_: http::Error) -> Self {
// TODO: Should this always be a protocol error?
Reason::ProtocolError.into()
}
}
impl fmt::Display for ConnectionError {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
use self::ConnectionError::*;