This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2006,30 +2006,32 @@ public static class HttpMethods
20062006
20072007 public static class CompressionTypes
20082008 {
2009- public static readonly string [ ] AllCompressionTypes = new [ ] { Deflate , GZip } ;
2009+ public static readonly string [ ] AllCompressionTypes = { Deflate , GZip } ;
20102010
20112011 public const string Default = Deflate ;
2012+ public const string Brotli = "br" ;
20122013 public const string Deflate = "deflate" ;
20132014 public const string GZip = "gzip" ;
20142015
20152016 public static bool IsValid ( string compressionType )
20162017 {
2017- return compressionType == Deflate || compressionType == GZip ;
2018+ return compressionType is Deflate or GZip or Brotli ;
20182019 }
20192020
20202021 public static void AssertIsValid ( string compressionType )
20212022 {
20222023 if ( ! IsValid ( compressionType ) )
20232024 {
20242025 throw new NotSupportedException ( compressionType
2025- + " is not a supported compression type. Valid types: gzip, deflate." ) ;
2026+ + " is not a supported compression type. Valid types: gzip, deflate, br ." ) ;
20262027 }
20272028 }
20282029
20292030 public static string GetExtension ( string compressionType )
20302031 {
20312032 switch ( compressionType )
20322033 {
2034+ case Brotli :
20332035 case Deflate :
20342036 case GZip :
20352037 return "." + compressionType ;
You can’t perform that action at this time.
0 commit comments