You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d500866
Browse filesBrowse the repository at this point in the historyBrowse files
fix(replay): Fix network detail response body size being unknown for gzip-compressed responses (#5592)
* fix(replay): Derive response body size from peeked bytes when contentLength is unknown
For gzip-compressed responses, OkHttp strips the Content-Length header
during transparent decompression, so response.body.contentLength() returns
-1. This caused NetworkRequestData.responseBodySize to be unknown for
replay network details.
Add originalByteCount to NetworkBody, set it from the actual byte array
in NetworkBodyParser.fromBytes, and use it as a fallback in
NetworkDetailCaptureUtils when the passed bodySize is null or -1. This
piggybacks on the existing peekBody call with no additional I/O.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* changelog
* Changelog
* fix(replay): make NetworkBody 3-arg constructor package-private
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## 8.46.0
4
4
5
+
### Fixes
6
+
7
+
- Session Replay: Fix network detail response body size being unknown for gzip-compressed responses ([#5592](https://github.com/getsentry/sentry-java/pull/5592))
8
+
5
9
### Behavioral Changes
6
10
7
11
- Collections returned by scope (e.g. `getBreadcrumbs`, `getTags`, `getAttachments`) are shared state and should not be mutated. ([#5541](https://github.com/getsentry/sentry-java/pull/5541))
0 commit comments