Consolidate the two cookie parsers `parseCookie` and `parseCookieHeader`
@s1gr1d đang làm issue này rồi.
Từ ngày 18/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 8.7k
- Fork
- 1.9k
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 543
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-javascript
-
Browser Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-javascript#24577 · 1 bình luận ·
-
Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-javascript#24558 · 1 bình luận ·
-
Task
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
getsentry/sentry-javascript#24557 · 1 bình luận ·
-
Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
getsentry/sentry-javascript#24556 · 1 bình luận ·
-
Task
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
getsentry/sentry-javascript#24555 · 1 bình luận ·
Tất cả issue của getsentry/sentry-javascript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ontola/atomic-server#1625 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
melgarafael/DeskcommCRM#1451 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
midnightntwrk/midnight-sdk#403 ·