From 46880985ef0a5cc92d64c098aac07364a48ee2e9 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 22 Jul 2026 13:36:35 +0200 Subject: [PATCH] http2: find content-encoding without case-sensitivity See RFC 9110 8.4.1 > All content codings are case-insensitive Ticket: 8760 --- rust/src/http2/decompression.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(),