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

Add a missing space to the strings produced for cookie: #38

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Add a missing space to the strings produced for cookie: #38

merged 1 commit into from
Sep 29, 2021

Conversation

Finesse
Copy link
Contributor

@Finesse Finesse commented Sep 26, 2021

As far as I understand, the toValueString method of a list of cookies returned by getCookies produces a string that can be used as a value of the Cookies HTTP header.

If so, there is a bug. According to the standard, the cookies must be separated by ; (a semicolon and a space). Browsers follow this standard both in the HTTP header and in document.cookie. Meanwhile node-cookiejar separates the cookies by ; (only a semicolon).

This is a problem because I use node-cookiejar as a dependency of superagent, and when I request websites, they parse cookies incorrectly because of the missing space.

This PR adds the missing space. Could you please publish the change to NPM?

@andyburke andyburke merged commit 68425a1 into bmeck:master Sep 29, 2021
@andyburke
Copy link
Collaborator

merged and released in 2.1.3

@Finesse
Copy link
Contributor Author

Finesse commented Sep 29, 2021

Thank you!

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.

2 participants