Consolidate the two cookie parsers `parseCookie` and `parseCookieHeader`
维护者通常 1 天内回复
@s1gr1d 已经在做这个了。
开始于 2026年9月18日。
评估
这个 Issue 还没有评估数据。
描述
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)returns{theme: 'dark'}and drops the blob silently. The span attribute shows['[Filtered]', 'theme=dark']. Set-Cookieattributes:filterCookies('sid=1; Max-Age=3600; Path=/', true)returns{sid: '[Filtered]', 'Max-Age': '3600', Path: '/'}.Max-AgeandPathare metadata, not cookies.parseCookieHeaderstrips them.- Only
parseCookieURL-decodes values and strips quotes.
One 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.
Out 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.
- 主要语言
- TypeScript
- 星标
- 8.8k
- 派生
- 1.9k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 554
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-javascript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 80/100
getsentry/sentry-javascript#24860 · 1 条评论 ·
维护者通常 1 天内回复
-
javascript
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/sentry-javascript#24200 · 2 条评论 ·
维护者通常 1 天内回复
-
javascript Task
难度 2/5 1-3 小时 新手友好度 82/100
getsentry/sentry-javascript#24134 · 1 条评论 ·
维护者通常 1 天内回复
-
Cloudflare Workers javascript Tests
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-javascript#24051 · 1 条评论 ·
维护者通常 1 天内回复
-
Bug Bun javascript
难度 2/5 1-3 小时 新手友好度 92/100
getsentry/sentry-javascript#24045 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/sentry-javascript 的全部 Issue
相似的 Issue
-
bug HemiStake
难度 2/5 1-3 小时 新手友好度 68/100
hemilabs/ui-monorepo#2413 ·
维护者通常 1 天内回复
-
component/ui framework/react kind/bug language/javascript
难度 2/5 1-3 小时 新手友好度 78/100
meshery/meshery#22216 · 3 条评论 ·
维护者通常 1 天内回复
-
type/bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
paperclipai/paperclip#14982 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 95/100
lingdojo/kana-dojo#31515 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复