Handle padding & stream priority when parsing headers frame

This commit is contained in:
Carl Lerche
2017-08-10 13:55:36 -07:00
parent e7c07b0b12
commit 50e0ad2f2a
4 changed files with 54 additions and 9 deletions

View File

@@ -38,10 +38,12 @@ impl Head {
/// Parse an HTTP/2.0 frame header
pub fn parse(header: &[u8]) -> Head {
let (stream_id, _) = StreamId::parse(&header[5..]);
Head {
kind: Kind::new(header[3]),
flag: header[4],
stream_id: StreamId::parse(&header[5..]),
stream_id,
}
}