Skip to content

Fix documentation around Expires header#1909

Open
menelaos wants to merge 3 commits intoyesodweb:masterfrom
menelaos:fix-documentation-for-expires
Open

Fix documentation around Expires header#1909
menelaos wants to merge 3 commits intoyesodweb:masterfrom
menelaos:fix-documentation-for-expires

Conversation

@menelaos
Copy link
Contributor

@menelaos menelaos commented Feb 26, 2026

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)


{- | Get the time 365 days from now in RFC 1123 format. For use as an expiry
date on a resource that never expires. See RFC 2616 section 14.21 for details.
date on a resource that never expires. See RFC 9111 section 5.3 for details.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

RFC 2616 has been obsoleted by RFC 7234, which in turn has been obsoleted by RFC 9111.

Side note:
Initially, the expiry date was set to the year 2037. This was changed in #870.

The newer standard theoretically permits longer lifetimes but I think it doesn't hurt to keep the current behaviour. The relevant passage:

Historically, HTTP required the Expires field value to be no more than a year in the future. While longer freshness lifetimes are no longer prohibited, extremely large values have been demonstrated to cause problems (e.g., clock overflows due to use of 32-bit integers for time values), and many caches will evict a response far sooner than that.

@menelaos
Copy link
Contributor Author

The current CI failure should be unrelated to the changes here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant