More work on HPACK decoding

This commit is contained in:
Carl Lerche
2017-05-30 21:56:50 -07:00
parent 3c850c2a34
commit b9da06a576
5 changed files with 92 additions and 49 deletions

View File

@@ -42,13 +42,16 @@ impl Entry {
Ok(Entry::Method(method))
}
b"scheme" => {
unimplemented!();
let value = try!(ByteStr::from_utf8(value));
Ok(Entry::Scheme(value))
}
b"path" => {
unimplemented!();
let value = try!(ByteStr::from_utf8(value));
Ok(Entry::Path(value))
}
b"status" => {
unimplemented!();
let status = try!(StatusCode::from_slice(&value));
Ok(Entry::Status(status))
}
_ => {
Err(DecoderError::InvalidPseudoheader)