Skip to content

Conversation

genius00hwan
Copy link

Summary

This PR improves documentation for ResponseCookie#getMaxAge() and ResponseCookieBuilder#maxAge().

Motivation

According to RFC 6265, Section 5.2.2,
a negative Max-Age value means no "Max-Age" attribute is sent, making the cookie a session cookie.
This was not clearly documented, which may cause confusion for developers.

Changes

  • Clarified Max-Age behavior in Javadoc
    • Positive → persistent cookie
    • Zero → immediate expiration (deleted)
    • Negative → session cookie (removed when browser closes)
  • Added explicit RFC reference
  • No functional or behavioral changes

Related Issues

Impact

No functional impact. Documentation update only.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 18, 2025
@bclozel
Copy link
Member

bclozel commented Sep 19, 2025

Thanks for the proposal, but I think the current description is short and to the point.

@bclozel bclozel closed this Sep 19, 2025
@bclozel bclozel added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants