fix(core): Set http cookie header attributes as string arrays - #24435
Conversation
size-limit report 📦
|
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5b53fee. Configure here.
| if (typeof headerValue !== 'string' || headerValue === '') { | ||
| return []; | ||
| } | ||
| return isSetCookie ? [headerValue.split(';')[0]!] : headerValue.split('; '); |
There was a problem hiding this comment.
Unguarded non-null assertion on split
Low Severity
parseCookieHeader uses a non-null assertion on the first split result with no comment explaining why a safer type is impossible. This repo's review rules require each new ! in SDK source to document that, because noUncheckedIndexedAccess makes the index look optional even though split always returns at least one element.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 5b53fee. Configure here.


follow up to #24231
It is better if we send then cookies as an array as well, where each entry of the array is one key/value pair.