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
2006
2006
2007
2007
public static class CompressionTypes
2008
2008
{
2009
- public static readonly string [ ] AllCompressionTypes = new [ ] { Deflate , GZip } ;
2009
+ public static readonly string [ ] AllCompressionTypes = { Deflate , GZip } ;
2010
2010
2011
2011
public const string Default = Deflate ;
2012
+ public const string Brotli = "br" ;
2012
2013
public const string Deflate = "deflate" ;
2013
2014
public const string GZip = "gzip" ;
2014
2015
2015
2016
public static bool IsValid ( string compressionType )
2016
2017
{
2017
- return compressionType == Deflate || compressionType == GZip ;
2018
+ return compressionType is Deflate or GZip or Brotli ;
2018
2019
}
2019
2020
2020
2021
public static void AssertIsValid ( string compressionType )
2021
2022
{
2022
2023
if ( ! IsValid ( compressionType ) )
2023
2024
{
2024
2025
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 ." ) ;
2026
2027
}
2027
2028
}
2028
2029
2029
2030
public static string GetExtension ( string compressionType )
2030
2031
{
2031
2032
switch ( compressionType )
2032
2033
{
2034
+ case Brotli :
2033
2035
case Deflate :
2034
2036
case GZip :
2035
2037
return "." + compressionType ;
You can’t perform that action at this time.
0 commit comments