Validate received content-length header (#43)

If a content-length header is provided, the value should match the sum
of all data frame lengths. If there is a mismatch, then the stream is
reset.
This commit is contained in:
Carl Lerche
2017-08-31 12:40:02 -04:00
committed by GitHub
parent 0b1fbc4b39
commit 6fd9674759
4 changed files with 134 additions and 6 deletions

View File

@@ -266,6 +266,10 @@ impl Headers {
(self.pseudo, self.fields)
}
pub fn fields(&self) -> &HeaderMap {
&self.fields
}
pub fn into_fields(self) -> HeaderMap {
self.fields
}