Skip to content

Commit

Permalink
Use correct set-cookie for the HTTP Client response object (#2326)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Nov 2, 2022
1 parent 90e9745 commit f809aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- Use correct set-cookie for the HTTP Client response object ([#2326](https://github.com/getsentry/sentry-java/pull/2326))

### Features

- Customizable fragment lifecycle breadcrumbs ([#2299](https://github.com/getsentry/sentry-java/pull/2299))
Expand Down
Expand Up @@ -194,8 +194,8 @@ class SentryOkHttpInterceptor(
}

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

Expand Down

0 comments on commit f809aac

Please sign in to comment.