KEMBAR78
Don't set Last-Modified if mtime is Unix epoch by akhilles · Pull Request #488 · static-web-server/static-web-server · GitHub
Skip to content

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 <4@4khil.com>
@semanticdiff-com
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