diff --git a/src/BUTR.CrashReport.Server.v13/JsonHandlerV13.cs b/src/BUTR.CrashReport.Server.v13/JsonHandlerV13.cs index 10dc3a9..cfab1ca 100644 --- a/src/BUTR.CrashReport.Server.v13/JsonHandlerV13.cs +++ b/src/BUTR.CrashReport.Server.v13/JsonHandlerV13.cs @@ -68,7 +68,7 @@ public async Task UploadJsonAsync(ControllerBase controller, Canc { var tenant = byte.TryParse(controller.Request.Headers["Tenant"].ToString(), out var tenantId) ? tenantId : (byte) 1; - if (controller.Request.Headers.ContentEncoding.Any(x => x?.Equals("gzip,deflate", StringComparison.OrdinalIgnoreCase) == true)) + if (controller.Request.Headers.ContentEncoding is ["gzip", "deflate"] or ["gzip,deflate"] or ["gzip, deflate"]) controller.Request.Body = await _gZipCompressor.DecompressAsync(controller.Request.Body, ct); else controller.Request.EnableBuffering(); diff --git a/src/BUTR.CrashReport.Server.v14/JsonHandlerV14.cs b/src/BUTR.CrashReport.Server.v14/JsonHandlerV14.cs index d7c7b48..12b15f5 100644 --- a/src/BUTR.CrashReport.Server.v14/JsonHandlerV14.cs +++ b/src/BUTR.CrashReport.Server.v14/JsonHandlerV14.cs @@ -68,7 +68,7 @@ public async Task UploadJsonAsync(ControllerBase controller, Canc { var tenant = byte.TryParse(controller.Request.Headers["Tenant"].ToString(), out var tenantId) ? tenantId : (byte) 1; - if (controller.Request.Headers.ContentEncoding.Any(x => x?.Equals("gzip,deflate", StringComparison.OrdinalIgnoreCase) == true)) + if (controller.Request.Headers.ContentEncoding is ["gzip", "deflate"] or ["gzip,deflate"] or ["gzip, deflate"]) controller.Request.Body = await _gZipCompressor.DecompressAsync(controller.Request.Body, ct); else controller.Request.EnableBuffering();