Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ETag as a strong validator over Last-Modified #2722

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

smlx
Copy link
Contributor

@smlx smlx commented Jul 2, 2024

Do you follow the guidelines?

As per the MDN article on HTTP caching:

During cache revalidation, if both If-Modified-Since and If-None-Match are present, then If-None-Match takes precedence for the validator.

Previously Miniflux would consider a resource unmodified if the Last-Modified header had not changed, even if the ETag had changed.

With this commit, Miniflux will consider a resource modified if the ETag header has changed, even if Last-Modified has not.

This fixes Bug 1 in https://rachelbythebay.com/w/2024/06/11/fsr/

smlx added 2 commits July 3, 2024 01:33
In particular, add a failing test for the case where ETag changes but
Last-Modified does not.
As per the MDN article on HTTP caching:

  During cache revalidation, if both If-Modified-Since and If-None-Match
  are present, then If-None-Match takes precedence for the validator.

  https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching

Previously Miniflux would consider a resource unmodified if the
Last-Modified header had not changed, even if the ETag had changed.

With this commit, Miniflux will consider a resource modified if the ETag
header has changed, even if Last-Modified has not.

This fixes Bug 1 in https://rachelbythebay.com/w/2024/06/11/fsr/
@fguillot fguillot merged commit bf1c851 into miniflux:main Jul 3, 2024
16 checks passed
@smlx smlx deleted the etag-last-modified branch July 3, 2024 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants