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

Fix: user defined cookies getting overwritten by stored cookies #3850

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

naman-bruno
Copy link
Contributor

Description

Issues: #2102, #1944

When a user sends the first request with a user-defined Cookie header, the request works as expected. However, the response from the server may include Set-Cookie headers. When the user sends a subsequent request, these cookies overwrite the user-defined cookies, leading to unexpected behavior.

Solution
This PR resolves the issue by merging the user-defined Cookie header with the cookies received from the server's Set-Cookie response. Both sets of cookies are now combined into a single Cookie header, ensuring that user-defined cookies are preserved while including any additional cookies set by the server.

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.
Screen.Recording.2025-01-21.at.3.43.37.PM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants