Skip to content

session: simplify set-cookie #774

wants to merge 1 commit into from

1 participant

lpinca commented Apr 2, 2013

The originalId == check is redundant, we can use isNew.
All the set-cookie skip conditions require !isNew, so we can put them under this condition.

Now that we have hasLongExpires, i think that we can remove the hash check originalHash == hash(req.session). Sessions with an expiration time under the "long" threshold will act like rolling sessions, updating the cookie on each request, regardless of changes to any stored data.

I will update the pr if this seems reasonable.

lpinca commented Apr 3, 2013

I will reopen this from a branch.

@lpinca lpinca closed this Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.