java-express icon indicating copy to clipboard operation
java-express copied to clipboard

MaxAge for SessionCookies should be treated in seconds

Open jalberto-ghub opened this issue 4 years ago • 1 comments

Do you want to request a feature or report a bug? bug

What is the current behavior? The value of maxAge for the cookie of the session-cookie is set as is (which will be treated as seconds). But the code treats this value as milli-seconds when cleaning the SessionCookie cache.

If the current behavior is a bug, please provide the steps to reproduce. Set maxAge to a number of seconds. You will see the browser keep sending the cookie for that amount of time, But the cookie will be lost and a new one created after that amount of milliseconds.

What is the expected behavior? The middletier should keep the SessionCookie for maxAge*1000

Please mention your java and java-express version. version 0.2.1

jalberto-ghub avatar Jan 27 '21 13:01 jalberto-ghub

This is addressed in my fork of this project.

https://github.com/masecla22/java-express If you want to take a look at it.

masecla22 avatar Sep 11 '21 13:09 masecla22