Title: Consolidate the two cookie parsers `parseCookie` and `parseCookieHeader` · Issue #24501 · getsentry/sentry-javascript · GitHub
Open Graph Title: Consolidate the two cookie parsers `parseCookie` and `parseCookieHeader` · Issue #24501 · getsentry/sentry-javascript
X Title: Consolidate the two cookie parsers `parseCookie` and `parseCookieHeader` · Issue #24501 · getsentry/sentry-javascript
Description: parseCookie (used by filterCookies for event cookie records) and parseCookieHeader (used by httpHeadersToSpanAttributes for span attributes) have several differences: Nameless segments: filterCookies('opaque-blob; theme=dark', true) retu...
Open Graph Description: parseCookie (used by filterCookies for event cookie records) and parseCookieHeader (used by httpHeadersToSpanAttributes for span attributes) have several differences: Nameless segments: filterCooki...
X Description: parseCookie (used by filterCookies for event cookie records) and parseCookieHeader (used by httpHeadersToSpanAttributes for span attributes) have several differences: Nameless segments: filterCooki...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/24501
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consolidate the two cookie parsers `parseCookie` and `parseCookieHeader`","articleBody":"`parseCookie` (used by `filterCookies` for event cookie records) and `parseCookieHeader` (used by `httpHeadersToSpanAttributes` for span attributes) have several differences:\n\n- Nameless segments: `filterCookies('opaque-blob; theme=dark', true)` returns `{theme: 'dark'}` and drops the blob silently. The span attribute shows `['[Filtered]', 'theme=dark']`.\n- `Set-Cookie` attributes: `filterCookies('sid=1; Max-Age=3600; Path=/', true)` returns `{sid: '[Filtered]', 'Max-Age': '3600', Path: '/'}`. `Max-Age` and `Path` are metadata, not cookies. `parseCookieHeader` strips them.\n- Only `parseCookie` URL-decodes values and strips quotes.\n\nOne parser returning ordered `[name, value][]` pairs, with a `Set-Cookie` mode, could work at both call sites. `filterCookies.test.ts` has two `it.fails` tests pinning the intended `Set-Cookie` behavior -> those need to be flipped when fixed.\n\n\nOut of the #24090 review: https://github.com/getsentry/sentry-javascript/pull/24090#discussion_r4041421140 and https://github.com/getsentry/sentry-javascript/pull/24090#discussion_r4041448119.","author":{"url":"https://github.com/s1gr1d","@type":"Person","name":"s1gr1d"},"datePublished":"2026-09-18T11:45:07Z","url":"https://github.com/getsentry/sentry-javascript/issues/24501"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2d3a8e2d-a94c-14df-65f3-2f237dd7e86f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C042:2B774B:A955F4:ED8E67:6B042FE4 |
| html-safe-nonce | 86535ad780a5e8c9b0138b9a0349b7df6edd0a0ca9f222d429e1097eb9248d80 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDQyOjJCNzc0QjpBOTU1RjQ6RUQ4RTY3OjZCMDQyRkU0IiwidmlzaXRvcl9pZCI6IjEwMzcyNTYwMzEzNzEyNzYyNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 47024a1dfcc85d79e502aadc1a79c801924ca82df0a8beb8f4df0016b797d73a |
| hovercard-subject-tag | issue:5499154396 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/24501/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8b4ec3d0fe4bc6c975dacf9e54b6110eb5109b3d229624f1c92d8c2898c34e04/getsentry/sentry-javascript/issues/24501 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8b4ec3d0fe4bc6c975dacf9e54b6110eb5109b3d229624f1c92d8c2898c34e04/getsentry/sentry-javascript/issues/24501 |
| og:image:alt | parseCookie (used by filterCookies for event cookie records) and parseCookieHeader (used by httpHeadersToSpanAttributes for span attributes) have several differences: Nameless segments: filterCooki... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | s1gr1d |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width