Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions crates/trusted-server-core/src/streaming_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ impl Compression {
/// Detect compression from content-encoding header
#[must_use]
pub fn from_content_encoding(encoding: &str) -> Self {
match encoding.to_lowercase().as_str() {
"gzip" => Self::Gzip,
"deflate" => Self::Deflate,
"br" => Self::Brotli,
_ => Self::None,
if encoding.eq_ignore_ascii_case("gzip") {
Self::Gzip
} else if encoding.eq_ignore_ascii_case("deflate") {
Self::Deflate
} else if encoding.eq_ignore_ascii_case("br") {
Self::Brotli
} else {
Self::None
}
}
}
Expand Down
Loading