Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Don't set Last-Modified if mtime is Unix epoch #488

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

Merged

Conversation

akhilles
Copy link
Contributor

Resolves #487

If the file's modified time is the UNIX epoch, then it's likely not valid and should not be included in the Last-Modified header to avoid cache revalidation issues. Tested on a NixOS container.

Resolves #487

Signed-off-by: Akhil Velagapudi <[email protected]>
Copy link

semanticdiff-com bot commented Oct 14, 2024

Review changes with SemanticDiff.

Analyzed 1 of 1 files.

Overall, the semantic diff is 63% smaller than the GitHub diff.

Filename Status
✔️ src/response.rs 62.5% smaller

@joseluisq joseluisq added enhancement New feature or request v2 v2 release labels Oct 14, 2024
Copy link
Collaborator

@joseluisq joseluisq left a comment

Choose a reason for hiding this comment

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

Thanks!

@joseluisq joseluisq merged commit de8482d into static-web-server:master Oct 14, 2024
38 checks passed
@joseluisq joseluisq added this to the v2.33.1 milestone Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2 v2 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't set "Last-Modified" if mtime is Unix epoch
2 participants