Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cookies): cookie header format #844

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

konomae
Copy link
Contributor

@konomae konomae commented Mar 21, 2024

  • Spec
  • It seems incorrect to have a trailing semicolon.

Copy link

changeset-bot bot commented Mar 21, 2024

🦋 Changeset detected

Latest commit: 3ac69e4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@edge-runtime/cookies Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 21, 2024

@konomae is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

const headers = new Headers()
const cookies = new RequestCookies(headers)
cookies.set('a', '1')
expect(headers.get('cookie')).toBe('a=1')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a=1;

const cookies = new RequestCookies(headers)
cookies.set('a', '1')
cookies.set('b', '2')
expect(headers.get('cookie')).toBe('a=1; b=2')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a=1; ; b=2;.

Copy link

vercel bot commented Mar 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
edge-runtime ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 8:51am

@Kikobeats Kikobeats merged commit 7e17b8e into vercel:main Mar 22, 2024
7 checks passed
@Kikobeats
Copy link
Member

awesome, thanks for this!

@github-actions github-actions bot mentioned this pull request Mar 22, 2024
@konomae konomae deleted the fix-cookie-header-format branch March 22, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants