From fea2a526a6a622874aee832010e72856d09643ef Mon Sep 17 00:00:00 2001 From: Fangdun Tsai Date: Sat, 1 Oct 2022 05:48:58 +0800 Subject: [PATCH] fix(core): compression: use short name br --- viz-core/src/middleware/compression.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viz-core/src/middleware/compression.rs b/viz-core/src/middleware/compression.rs index 1d8d6dcb..7be3b576 100644 --- a/viz-core/src/middleware/compression.rs +++ b/viz-core/src/middleware/compression.rs @@ -121,7 +121,7 @@ impl FromStr for ContentCoding { Ok(ContentCoding::Deflate) } else if s.eq_ignore_ascii_case("gzip") { Ok(ContentCoding::Gzip) - } else if s.eq_ignore_ascii_case("brotli") { + } else if s.eq_ignore_ascii_case("br") { Ok(ContentCoding::Brotli) } else if s == "*" { Ok(ContentCoding::Any) @@ -136,7 +136,7 @@ impl From for &'static str { match cc { ContentCoding::Gzip => "gzip", ContentCoding::Deflate => "deflate", - ContentCoding::Brotli => "brotli", + ContentCoding::Brotli => "br", ContentCoding::Any => "*", } }