Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

fix unsent cookie issue #13

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

pine3ree
Copy link
Contributor

@weierophinney

Does this make sense to You?

The $cookie internal property gets the value from the request session_name() cookie, if any.
If no request cookie value is found it gets a freshly generated session id value
In any case $cookie has the value for the session id and its used to start the session

When returning the response we must include a set-cookie header with the same value (and name equal to session_name())

If the session is regenerated a new session id value is created and that value (saved into $cookie) must be passed into the response cookie header, instead of the old session id.

kind regards,

#10

Copy link
Member

@weierophinney weierophinney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach makes sense to me!

@weierophinney weierophinney merged commit b467aff into zendframework:master Apr 26, 2018
weierophinney added a commit that referenced this pull request Apr 26, 2018
weierophinney added a commit that referenced this pull request Apr 26, 2018
weierophinney added a commit that referenced this pull request Apr 26, 2018
@weierophinney
Copy link
Member

Thanks, @pine3ree!

@pine3ree pine3ree deleted the fix-unsent-cookie branch April 27, 2018 20:19
pine3ree pushed a commit to pine3ree/zend-expressive-session-ext that referenced this pull request May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants