rack-session icon indicating copy to clipboard operation
rack-session copied to clipboard

Do not return new cookies when session isn’t changed

Open hieuk09 opened this issue 8 months ago • 3 comments

Close https://github.com/rack/rack-session/issues/52

hieuk09 avatar Aug 07 '25 12:08 hieuk09

This looks okay to me. It seems robust to compare with the original value. @jeremyevans do you have any opinion on this?

ioquatix avatar Oct 05 '25 11:10 ioquatix

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.

ioquatix avatar Oct 05 '25 11:10 ioquatix

@jeremyevans Thanks for the review. I have updated the code in 445c2d1

hieuk09 avatar Oct 07 '25 00:10 hieuk09