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

Bugfix: Ensure array-style 'set-cookie' headers are parsed correctly #388

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

tomo324
Copy link
Contributor

@tomo324 tomo324 commented Dec 5, 2024

closes #287

  • When an actualCookie is an array with multiple elements, they are joined with '; ' to make a single string before parsing.
    • It is OK without it, but adding ';' after all join() operations are complete ensures that the state before parsing multiple cookies is the same as a single string cookie.

Example:
If an array of cookies like ["one=1", "two=2"] is set via set-cookie header, the join() operation will result in a string like 'one=1; two=2;' which can be parsed correctly.

@ASaiAnudeep ASaiAnudeep merged commit 758678c into pactumjs:master Dec 6, 2024
2 of 6 checks passed
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.

expectCookiesLike Fails when cookies are set via setHeaders('Set-Cookie', cookieArray)
2 participants