Ignore 1xx frames (#521)

Closes #515
This commit is contained in:
Kornel
2021-02-25 16:57:42 +00:00
committed by GitHub
parent 30ca832790
commit 89d91b0a4f
4 changed files with 72 additions and 11 deletions

View File

@@ -254,6 +254,11 @@ impl Headers {
&mut self.header_block.pseudo
}
/// Whether it has status 1xx
pub(crate) fn is_informational(&self) -> bool {
self.header_block.pseudo.is_informational()
}
pub fn fields(&self) -> &HeaderMap {
&self.header_block.fields
}
@@ -599,6 +604,12 @@ impl Pseudo {
pub fn set_authority(&mut self, authority: BytesStr) {
self.authority = Some(authority);
}
/// Whether it has status 1xx
pub(crate) fn is_informational(&self) -> bool {
self.status
.map_or(false, |status| status.is_informational())
}
}
// ===== impl EncodingHeaderBlock =====