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

uWebSockets duplicate set-cookie responses #3316

Open
nathan-ahn opened this issue Jun 10, 2024 · 0 comments
Open

uWebSockets duplicate set-cookie responses #3316

nathan-ahn opened this issue Jun 10, 2024 · 0 comments
Labels

Comments

@nathan-ahn
Copy link

Describe the bug

When using uWebSockets.js with Yoga, cookies with multiple values are duplicated.
Example:
name=value0; SameSite=None; Secure, name=value1; SameSite=Strict; Secure -> name=value0; SameSite=None; Secure, name=value1; SameSite=Strict; Secure, name=value0; SameSite=None; Secure, name=value1; SameSite=Strict; Secure

This issue does not appear to occur when running on other servers (tested using Node's server and Express). This problem also does not occur when setting cookies from within uWebSockets.js directly (bypassing Yoga).

Your Example Website or App

https://github.com/nahn20/yoga-graphql-duplicate-cookies

Steps to Reproduce the Bug or Issue

Run one of the demo servers with npm run node, npm run express, or npm run uWebSockets.

Then, while the server is running, run either npm run ping or npm run pingRoot (uWebSockets only) to see the results. These scripts ping the server with a trivial request and log the response and cookies.

Expected behavior

I expected the set-cookie header value to not be duplicated when run on uWebSockets. Additionally, I expected the set-cookie header value to match that of Node and Express.

Screenshots or Videos

No response

Platform

  • OS: macOS (issue also occurs on Fargate (Linux) but that was using our full Yoga server rather than the minimal example repository)
  • NodeJS: 18.18.2
  • graphql-yoga: 5.3.1

Additional context

No response

@n1ru4l n1ru4l added stage/1-reproduction A reproduction exists kind/bug labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants