rack-session
rack-session copied to clipboard
Do not return new cookies when session isn’t changed
Close https://github.com/rack/rack-session/issues/52
This looks okay to me. It seems robust to compare with the original value. @jeremyevans do you have any opinion on this?
For reference, I did something like this in the past:
https://github.com/socketry/utopia/blob/main/lib/utopia/session/lazy_hash.rb
Tracking whether any changes were made. But if you changed it to a new value and then back to the original, my code would not pick that up, but this PR would.
@jeremyevans Thanks for the review. I have updated the code in 445c2d1