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

Search every Cookie header for session cookie #14

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Search every Cookie header for session cookie #14

merged 1 commit into from
Nov 14, 2022

Conversation

Spanfile
Copy link
Contributor

HTTP/2 allows a request to have multiple separate Cookie headers with a single Cookie in each (RFC 7540) as opposed to HTTP/1.1 behaviour with all cookies concatenated into a single Cookie header. This PR changes the method for searching the session cookie value in a request to account for multiple Cookie headers, and for multiple cookies in a single header. It also adds unit tests for both scenarios where there are multiple cookie values to search through.

HTTP/2 allows a request to have multiple separate Cookie headers with a
single Cookie in each, as opposed to HTTP/1.1 behaviour with all cookies
concatenated into a single Cookie header. Change the method for
searching the session cookie value in a request to account for multiple
Cookie headers, and for multiple cookies in a single header. Add unit
tests for both scenarios.
@maxcountryman
Copy link
Owner

Thanks for putting this together!

@maxcountryman maxcountryman merged commit 046e6ba into maxcountryman:main Nov 14, 2022
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