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

Correctly handle multiple set-cookie headers #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

H0R5E
Copy link

@H0R5E H0R5E commented Mar 13, 2023

This PR changes how set-cookies headers with multiple values are returned. Previously, the code looks for Array types in the headers property, but multiple values are actually stored as a comma delimited list.

Following the adapter-netlify approach, the set-cookie-parser package is used here to split the set-cookie header while all other headers are left unchanged.

H0R5E added 2 commits March 13, 2023 09:33
This commit changes how set-cookies headers with multiple values
are returned. Previously, the code looks for Array types in the
headers, but multiple values are actually stored as a comma
delimited list. Following the adapter-netlify approach, the
set-cookie-parser package is used to split the set-cookie header
while all other headers are left unchanged.
@H0R5E
Copy link
Author

H0R5E commented Mar 14, 2023

I have added a version of the PR which includes some Vitest tests in #33, if that's useful.

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.

1 participant