You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large cookie Max-Age overflows int in ServletServerHttpResponse, resulting in a session cookie or deletion #37472
When the Max-Age of a ResponseCookie exceeds Integer.MAX_VALUE seconds, Servlet-based WebFlux servers emit a cookie that differs from the requested one. Depending on the value, it becomes a session cookie or the cookie is deleted. Reactor Netty and Jetty Core emit the requested Max-Age, so the behavior differs depending on the server.
The narrowing cast to int overflows, and Servlet Cookie#setMaxAge(int) interprets a negative value as a session cookie and 0 as deletion. RestTestClientResponseAssert performs the same conversion.
This can be fixed by limiting the converted value to Integer.MAX_VALUE, as in #37427.
Activity
bclozel commentedon Oct 13, 2026
No need for an issue and a PR