We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54a0f3d commit 0eff4d1Copy full SHA for 0eff4d1
1 file changed
crates/trusted-server-core/src/streaming_processor.rs
@@ -52,11 +52,14 @@ impl Compression {
52
/// Detect compression from content-encoding header
53
#[must_use]
54
pub fn from_content_encoding(encoding: &str) -> Self {
55
- match encoding.to_lowercase().as_str() {
56
- "gzip" => Self::Gzip,
57
- "deflate" => Self::Deflate,
58
- "br" => Self::Brotli,
59
- _ => 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") {
60
+ Self::Brotli
61
+ } else {
62
+ Self::None
63
}
64
65
0 commit comments