Capture all repeated `Cookie` and `Set-Cookie` header values
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
调研方向
先检查 OkHttp、Ktor、Apollo 3 和 Apollo 4 集成中现有的 cookie 提取和 header 访问路径,然后比较其他 SDK 如何处理重复 header。在运行集成测试之前,跟踪共享的 cookie 策略以及缺少 Data-Collection 时的行为。完成的标准是:覆盖重复的 Cookie 和 Set-Cookie 值,且不会进行不安全的逗号处理;过滤仍然有效;格式错误的值 fail closed。
由索引模型根据 Issue 内容生成。
描述
Problem
The OkHttp, Ktor, and Apollo integrations capture only one Cookie or Set-Cookie header value when creating request and response contexts. Their current header accessors select a single value, so additional cookie fields are omitted from Sentry telemetry.
This is valid HTTP behavior. In particular, HTTP/2 allows clients to split the Cookie field into multiple header fields for compression. Responses also commonly contain multiple Set-Cookie fields.
This is follow-up completeness work from #5811 and supports #5666.
Check what other SDKs are doing before implementing.
Proposed solution
Make cookie extraction list-aware across OkHttp, Ktor, Apollo 3, and Apollo 4:
- Combine repeated request
Cookiefields with;before applying the effective cookie policy. - Process each response
Set-Cookiefield independently because each field represents one cookie and its attributes. - Do not comma-join or comma-split
Set-Cookievalues. A validExpiresattribute contains a comma. - Add shared core helpers or integration-specific adapters that apply the effective cookie policy to every value.
- Preserve valid
Set-Cookieattributes and fail closed for malformed input.
Preserve the existing absent-Data-Collection compatibility behavior for each integration.
Acceptance criteria
- OkHttp, Ktor, Apollo 3, and Apollo 4 capture all repeated cookie header values supported by their header APIs.
- Multiple request
Cookiefields are combined with;and filtered as one cookie string. - Multiple response
Set-Cookiefields are filtered independently without comma splitting or joining. - Built-in sensitive-cookie filtering and configured allow-list, deny-list, and off behavior apply to every cookie value.
- Malformed cookie values never bypass filtering.
- Integration tests cover at least two request
Cookiefields and two responseSet-Cookiefields where the underlying header API supports repeated values.
- 主要语言
- Kotlin
- 星标
- 1.4k
- 派生
- 478
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 65
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-java 的其他 Issue
-
Platform: Java
难度 2/5 半天 新手友好度 76/100
getsentry/sentry-java#6161 · 1 条评论 ·
维护者通常 1 天内回复
-
Bug Java Platform: Android Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
维护者通常 1 天内回复
-
Feature Java Platform: Java Spans
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry-java#5984 · 1 条评论 ·
维护者通常 1 天内回复
-
Android Task Traces
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry-java#5376 · 1 条评论 ·
维护者通常 1 天内回复
-
Android Docs Errors
难度 2/5 1-3 小时 新手友好度 64/100
getsentry/sentry-java#5375 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/sentry-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
block/artifact-swap#176 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
librepods-org/librepods#802 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
mrmans0n/asyncresult#102 ·
维护者通常 2 天内回复
-
follow-up
难度 2/5 1-3 小时 新手友好度 88/100
yschimke/homeassistant-remotecompose#680 ·
维护者通常 1 天内回复
-
:wave: team-triage a:chore in:isolated-projects in:kotlin-dsl
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复