Treat Max-Age<=0 as immediate expiry (RFC 6265)#805
Merged
arturobernalg merged 1 commit intoapache:masterfrom Feb 20, 2026
Merged
Treat Max-Age<=0 as immediate expiry (RFC 6265)#805arturobernalg merged 1 commit intoapache:masterfrom
arturobernalg merged 1 commit intoapache:masterfrom
Conversation
Align strict Max-Age parsing with RFC 6265 user-agent processing. Non-positive delta-seconds now expire cookies immediately instead of being rejected as malformed.
ok2c
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 6265 defines user-agent processing for Max-Age as follows (Section 5.2.2, lines 931–940 in the datatracker text view):
“If the first character of the attribute-value is not a DIGIT or a '-' character, ignore the cookie-av.”
“If delta-seconds is less than or equal to zero (0), let expiry-time be the earliest representable date and time.”