diff --git a/src/BUTR.CrashReportServer/Controllers/CrashUploadController.cs b/src/BUTR.CrashReportServer/Controllers/CrashUploadController.cs index af71085..d84f517 100644 --- a/src/BUTR.CrashReportServer/Controllers/CrashUploadController.cs +++ b/src/BUTR.CrashReportServer/Controllers/CrashUploadController.cs @@ -112,6 +112,9 @@ private async Task UploadHtmlAsync(CancellationToken ct) private async Task UploadJsonAsync(CancellationToken ct) { + if (Request.Headers.ContentEncoding.Any(x => x?.Equals("gzip,deflate", StringComparison.OrdinalIgnoreCase) == true)) + Request.Body = await _gZipCompressor.DecompressAsync(Request.Body, ct); + if (await HttpContext.Request.ReadFromJsonAsync(_jsonSerializerOptions, ct) is not { CrashReport: { } crashReport, LogSources: { } logSources }) return StatusCode(StatusCodes.Status500InternalServerError);