-
Notifications
You must be signed in to change notification settings - Fork 166
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
Multiple Set-Cookie headers in response #23
Comments
Thanks. I've pushed a fix in this commit: c052ae9 The response for your example now is: $ curl -I localhost:4000/auth
HTTP/1.1 200 OK
Set-Cookie: session=K1v4RXFtITKE0Q1GsQmmQrGwWn7iLULhq-sFXEQD0t0umOl14hioyBWx_bg8NTlRrMJ2NlVMMUh0MNO97G4918JIjzr0YciqO2Vv6kFbBFuWWdQmxGtT_2Gw5kpieUOWZZH_qK__x0XRd4jl2h6AesnY15QiPUutDQYiJO3v; Path=/; HttpOnly
Date: Thu, 26 Oct 2017 11:00:34 GMT
Content-Type: text/plain; charset=utf-8 |
Thank you! |
I don't think it's the right way to fix this problem. I propose we would expose However, it's such an overhaul. Any thoughts, @alexedwards ? |
@flisky It's a difficult choice. Making the saving of session data manual, via an exported Previous versions of SCS used to call I haven't thought it through properly, but perhaps having an |
I agree with @flisky in that modifying session data should be separate from storing/saving session data. For any non-cookie store, the performance impact adds up significantly since each IO-bound round trip is expensive. I like the idea of using middleware to save the session. Would providing a separate middleware for non- Also, implementing an autosave option seems like it will be messy since the session lifecycle management be split between the manager and session. |
Also, any plans to push a new release with this commit: c052ae9 ? I'd like to pin to a version of scs instead of relying on the master branch |
I've opened a separate issue to discuss whether modifying session data should be separate from storing/saving session data: #36 |
Here is small example:
Here is
/auth
response:As you can see there are three different
Set-Cookie
headers with the same cookie-name in response which is wrong according to RFC 6265:The text was updated successfully, but these errors were encountered: