diff --git a/rust/src/http2/decompression.rs b/rust/src/http2/decompression.rs index 0bb8a53622..c71a50b096 100644 --- a/rust/src/http2/decompression.rs +++ b/rust/src/http2/decompression.rs @@ -189,15 +189,15 @@ impl HTTP2DecoderHalf { pub fn http2_encoding_fromvec(&mut self, input: &[u8]) { //use first encoding... if self.encoding == HTTP2ContentEncoding::Unknown { - if input == b"gzip" { + if input.eq_ignore_ascii_case(b"gzip") { self.encoding = HTTP2ContentEncoding::Gzip; self.decoder = HTTP2Decompresser::Gzip(Box::new(GzDecoder::new(HTTP2cursor::new()))); - } else if input == b"deflate" { + } else if input.eq_ignore_ascii_case(b"deflate") { self.encoding = HTTP2ContentEncoding::Deflate; self.decoder = HTTP2Decompresser::Deflate(Box::new(DeflateDecoder::new(HTTP2cursor::new()))); - } else if input == b"br" { + } else if input.eq_ignore_ascii_case(b"br") { self.encoding = HTTP2ContentEncoding::Br; self.decoder = HTTP2Decompresser::Brotli(Box::new(brotli::Decompressor::new( HTTP2cursor::new(),