Skip to content
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

Max-Age=0 doesn't removes a cookie on a client #30

Open
gugglegum opened this issue May 12, 2018 · 0 comments
Open

Max-Age=0 doesn't removes a cookie on a client #30

gugglegum opened this issue May 12, 2018 · 0 comments

Comments

@gugglegum
Copy link

When setting max-age parameter to zero (0), the cookie is set as session cookie instead of removal. The package treats zero value of max-age as it's not set. But according to RFC-6265 zero value should remove cookie as well as negative value. Here's a quote of the section "5.2.2. The Max-Age Attribute":

If delta-seconds is less than or equal to zero (0), let expiry-time be the earliest representable date and time. Otherwise, let the expiry-time be the current date and time plus delta-seconds seconds.

The workaround of this bug is to use negative values. I can make pull-request if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant