Skip to content

Commit f809aac

Browse files
authored
Use correct set-cookie for the HTTP Client response object (#2326)
1 parent 90e9745 commit f809aac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- Use correct set-cookie for the HTTP Client response object ([#2326](https://github.com/getsentry/sentry-java/pull/2326))
8+
59
### Features
610

711
- Customizable fragment lifecycle breadcrumbs ([#2299](https://github.com/getsentry/sentry-java/pull/2299))

sentry-android-okhttp/src/main/java/io/sentry/android/okhttp/SentryOkHttpInterceptor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ class SentryOkHttpInterceptor(
194194
}
195195

196196
val sentryResponse = io.sentry.protocol.Response().apply {
197-
// Cookie is only sent if isSendDefaultPii is enabled due to PII
198-
cookies = if (hub.options.isSendDefaultPii) response.headers["Cookie"] else null
197+
// Set-Cookie is only sent if isSendDefaultPii is enabled due to PII
198+
cookies = if (hub.options.isSendDefaultPii) response.headers["Set-Cookie"] else null
199199
headers = getHeaders(response.headers)
200200
statusCode = response.code
201201

0 commit comments

Comments
 (0)