Skip to content

Honor valueless max-stale requests - #13546

Open
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:fix-valueless-max-stale
Open

Honor valueless max-stale requests#13546
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:fix-valueless-max-stale

Conversation

@bneradt

@bneradt bneradt commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

A valueless Cache-Control: max-stale directive permits clients to
accept responses stale by any amount. Header cooking instead discarded
the directive, causing ATS to revalidate an otherwise acceptable cached
response.

Commit d3196a8 ("Ignore malformed
Cache-Control directives per RFC 7234", #12670) introduced the
regression by treating every numeric directive without an equals sign
as malformed.

This patch represents valueless max-stale with the existing unlimited
sentinel and adds parser and end-to-end regression coverage.

@bneradt bneradt added this to the 11.0.0 milestone Aug 13, 2026
Copilot AI lite review requested due to automatic review settings August 13, 2026 19:48
@bneradt bneradt self-assigned this Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bneradt
bneradt force-pushed the fix-valueless-max-stale branch from 09cb863 to 5421cf2 Compare August 13, 2026 19:52
Copilot AI review requested due to automatic review settings August 13, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@bneradt

bneradt commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Backport note: this change is only needed on master. The 10.x branches already handle valueless max-stale correctly, so no 10.x backport is necessary.

A valueless Cache-Control: max-stale directive permits clients to
accept responses stale by any amount. Header cooking instead discarded
the directive, causing ATS to revalidate an otherwise acceptable cached
response.

Commit d3196a8 ("Ignore malformed
Cache-Control directives per RFC 7234", apache#12670) introduced the
regression by treating every numeric directive without an equals sign
as malformed.

This patch represents valueless max-stale with the existing unlimited
sentinel and adds parser and end-to-end regression coverage.
@bneradt
bneradt force-pushed the fix-valueless-max-stale branch from 5421cf2 to fc4490b Compare August 13, 2026 19:56
@bneradt bneradt removed the AuTest label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants