-
-
Notifications
You must be signed in to change notification settings - Fork 226
Description
Package
Sentry
.NET Flavor
.NET Core
.NET Version
9.0.6
OS
Windows
OS Version
11
Development Environment
Visual Studio v17.x
SDK Version
3.23.1
Self-Hosted Sentry Version
No response
Workload Versions
aspire 8.2.2/8.0.100 VS 17.14.36212.18
When using Sentry SDK in an ASP.NET Core app with UseRequestDecompression(), HTTP requests with Content-Encoding: gzip are still logged with their raw compressed body in Sentry.
This occurs because UseRequestDecompression() only integrates with model binding and does not replace or decompress HttpContext.Request.Body, which Sentry reads directly.
Steps to Reproduce
Configure ASP.NET Core pipeline with UseRequestDecompression() early.
Enable Sentry automatic request body logging.
Send a POST request with Content-Encoding: gzip and gzipped JSON body.
Trigger an exception.
Check Sentry issue – Request.Body is unreadable gzip binary.
Expected Result
Sentry should log the decompressed request body when UseRequestDecompression() is enabled and the request has Content-Encoding: gzip.
Actual Result
Metadata
Metadata
Assignees
Labels
Projects
Status
Status
