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

Do save cookies should put only the names and their values to requests #89

Conversation

RoGer2856
Copy link
Contributor

@RoGer2856 RoGer2856 commented Aug 8, 2024

According to the HTTP State Management RFC, cookie header fields are in format: <cookie-name>=<cookie-value>. Optionally multiple cookies can be defined in one cookie header separated semicolons.

The set-cookie header uses semicolons for separating different attributes (e.g., path, domain, samesite). Sending attributes in the cookie header causes parsing problems in middlewares and request handlers. Even CookieJar assumes, that cookies are separated by a semicolon, therefore it tries to parse the attributes individally.

This pull request contains some tests for these issues, and fixes the problem.

Gergo Roth added 3 commits August 8, 2024 12:41
…he upcoming requests (strip everything else, e.g., samesite, path)
…ues to the upcoming requests (strip everything else, e.g., samesite, path)
@JosephLenton
Copy link
Owner

Hey @RoGer2856 , thanks for finding this and providing a PR. I'll merge and release this now.

Sorry for the delays in looking at this.

@JosephLenton JosephLenton merged commit 3948f8e into JosephLenton:main Aug 15, 2024
@RoGer2856
Copy link
Contributor Author

RoGer2856 commented Aug 15, 2024 via email

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