Skip to content

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

Merged
andyburke merged 1 commit into
bmeck:masterfrom
Finesse:hotfix/http-request-value
Sep 29, 2021
Merged

Add a missing space to the strings produced for cookie:#38
andyburke merged 1 commit into
bmeck:masterfrom
Finesse:hotfix/http-request-value

Conversation

@Finesse

@Finesse Finesse commented Sep 26, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

merged and released in 2.1.3

@Finesse

Finesse commented Sep 29, 2021

Copy link
Copy Markdown
Contributor Author

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