Skip to content

fix: use correct date format for expires, last-modified, and if-modified-since headers #52743

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
merged 2 commits into from
Jun 10, 2025

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented May 10, 2025

Summary

B A
Sat, 10 May 2025 18:17:41 +0000 Sat, 10 May 2025 18:17:41 GMT

RFC: https://httpwg.org/specs/rfc9110.html#http.date

Chrome and Firefox seem quite easy about the format of the headers. I couldn't see a difference in their behavior regarding caching the files, so I wouldn't backport it.

Checklist

@kesselb kesselb added this to the Nextcloud 32 milestone May 10, 2025
@kesselb kesselb self-assigned this May 10, 2025
@kesselb kesselb requested a review from a team as a code owner May 10, 2025 17:24
@kesselb kesselb added bug 3. to review Waiting for reviews labels May 10, 2025
@kesselb kesselb requested review from skjnldsv, yemkareems and provokateurin and removed request for a team May 10, 2025 17:24
@kesselb kesselb changed the title fix: use correct format for expires, last-modified, and if-modified-since headers fix: use correct date format for expires, last-modified, and if-modified-since headers May 10, 2025
Copy link
Member

@solracsf solracsf left a comment

Choose a reason for hiding this comment

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

👌

@provokateurin
Copy link
Member

provokateurin commented May 10, 2025

I remember having come across this in the past, but didn't see a benefit in changing something if it currently works just fine. CC @Leptopoda

@kesselb
Copy link
Contributor Author

kesselb commented May 18, 2025

Yeah, I get your point - nothing is really broken, and most clients or proxies probably just assume GMT anyway.

But still, I think it’s worth changing. The current format isn’t even listed as a valid alternative in the RFC — it’s just plain wrong. And if there’s no real downside to fixing it, why not just make it correct and be spec-compliant?

@kesselb kesselb force-pushed the bug/noid/expires-date-format branch from 5d567c7 to 226fbe7 Compare May 19, 2025 08:52
@provokateurin provokateurin enabled auto-merge May 21, 2025 15:33
kesselb added 2 commits June 10, 2025 13:15
…ince headers

Before: Sat, 10 May 2025 18:17:41 +0000
After: Sat, 10 May 2025 18:17:41 GMT

RFC: https://httpwg.org/specs/rfc9110.html#http.date

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb kesselb force-pushed the bug/noid/expires-date-format branch from 226fbe7 to 1ac85a3 Compare June 10, 2025 11:15
@provokateurin provokateurin merged commit 1474fa3 into master Jun 10, 2025
202 of 205 checks passed
@provokateurin provokateurin deleted the bug/noid/expires-date-format branch June 10, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants