@@ -1375,7 +1375,7 @@ namespace ServiceStack
1375
1375
{
1376
1376
public static class MimeTypes
1377
1377
{
1378
- public static Dictionary < string , string > ExtensionMimeTypes = new Dictionary < string , string > ( ) ;
1378
+ public static Dictionary < string , string > ExtensionMimeTypes = new ( ) ;
1379
1379
public const string Utf8Suffix = "; charset=utf-8" ;
1380
1380
1381
1381
public const string Html = "text/html" ;
@@ -1957,7 +1957,7 @@ public static class HttpHeaders
1957
1957
public const string Host = "Host" ;
1958
1958
public const string UserAgent = "User-Agent" ;
1959
1959
1960
- public static HashSet < string > RestrictedHeaders = new HashSet < string > ( StringComparer . OrdinalIgnoreCase )
1960
+ public static HashSet < string > RestrictedHeaders = new ( StringComparer . OrdinalIgnoreCase )
1961
1961
{
1962
1962
Accept ,
1963
1963
Connection ,
@@ -1990,7 +1990,7 @@ public static class HttpMethods
1990
1990
"POLL" , "SUBSCRIBE" , "UNSUBSCRIBE" //MS Exchange WebDav: http://msdn.microsoft.com/en-us/library/aa142917.aspx
1991
1991
} ;
1992
1992
1993
- public static HashSet < string > AllVerbs = new HashSet < string > ( allVerbs ) ;
1993
+ public static HashSet < string > AllVerbs = new ( allVerbs ) ;
1994
1994
1995
1995
public static bool Exists ( string httpMethod ) => AllVerbs . Contains ( httpMethod . ToUpper ( ) ) ;
1996
1996
public static bool HasVerb ( string httpVerb ) => Exists ( httpVerb ) ;
@@ -2034,7 +2034,7 @@ public static void AssertIsValid(string compressionType)
2034
2034
if ( ! IsValid ( compressionType ) )
2035
2035
{
2036
2036
throw new NotSupportedException ( compressionType
2037
- + " is not a supported compression type. Valid types: gzip, deflate, br." ) ;
2037
+ + " is not a supported compression type. Valid types: " + string . Join ( ", " , AllCompressionTypes ) ) ;
2038
2038
}
2039
2039
}
2040
2040
@@ -2057,7 +2057,7 @@ public static class HttpStatus
2057
2057
{
2058
2058
public static string GetStatusDescription ( int statusCode )
2059
2059
{
2060
- if ( statusCode >= 100 && statusCode < 600 )
2060
+ if ( statusCode is >= 100 and < 600 )
2061
2061
{
2062
2062
int i = statusCode / 100 ;
2063
2063
int j = statusCode % 100 ;
@@ -2069,7 +2069,7 @@ public static string GetStatusDescription(int statusCode)
2069
2069
return string . Empty ;
2070
2070
}
2071
2071
2072
- private static readonly string [ ] [ ] Descriptions = new string [ ] [ ]
2072
+ private static readonly string [ ] [ ] Descriptions =
2073
2073
{
2074
2074
null ,
2075
2075
new [ ]
0 commit comments