Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit a17d6ca

Browse files
committed
Change default Compression Type to Brotli if net6
1 parent 729f90b commit a17d6ca

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/ServiceStack.Text/HttpUtils.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,18 +2015,23 @@ public static class CompressionTypes
20152015
GZip,
20162016
};
20172017

2018+
#if NET6_0_OR_GREATER
2019+
public const string Default = Brotli;
2020+
#else
20182021
public const string Default = Deflate;
2022+
#endif
2023+
20192024
public const string Brotli = "br";
20202025
public const string Deflate = "deflate";
20212026
public const string GZip = "gzip";
20222027

20232028
public static bool IsValid(string compressionType)
20242029
{
2025-
return compressionType is Deflate or GZip
20262030
#if NET6_0_OR_GREATER
2027-
or Brotli
2031+
return compressionType is Deflate or GZip or Brotli;
2032+
#else
2033+
return compressionType is Deflate or GZip;
20282034
#endif
2029-
;
20302035
}
20312036

20322037
public static void AssertIsValid(string compressionType)

0 commit comments

Comments
 (0)