-
Notifications
You must be signed in to change notification settings - Fork 422
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
[BUG] Tapir Endpoint Incorrectly Merging Set-Cookie Headers in HTTP Response #3654
Comments
It work incorrectly with the ZIO HTTP server, but it works properly with the Vert.x server |
I think setting multiple cookies in one header is correct per the HTTP spec (see here), but the "living standard" might be different. As a work-around, maybe you can try including two More generally, I think it might make sense to include special rules for |
Thank you for the response. Regarding the temporary solution: using two Additionally, I want to mention that pure zio http with its methods for adding cookies works correctly with multiple Set-Cookie headers. |
This change makes the behaviour of handling multiple Set-Cookie headers consistent among multiple server backends. See #3654 for more details.
Tapir version: 1.0.1 - 1.10.0
Scala version: 2.13.10
The syntax for setting cookies is clearly defined and can be found in the documentation here:
There's an issue with one of my Tapir endpoints where the response's Set-Cookie header is not being handled correctly by browsers. The header appears to be consolidated into a single line:
However, browsers expect each cookie to be set with a separate Set-Cookie header like so:
Would you be able to assist in resolving this?
The text was updated successfully, but these errors were encountered: