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

Fix 24h timeformat for expire and last-modified header #2904

Merged
merged 2 commits into from Nov 3, 2022

Conversation

patrick-zippenfenig
Copy link
Contributor

@patrick-zippenfenig patrick-zippenfenig commented Nov 3, 2022

Expire and Last-Modified header were encoding the hour part in 12h format (hh) instead of 24h format (HH). This results in timestamps being 12 hours off for all afternoon hours. This fixes the format used to follow the spec correctly and adds tests to ensure no regressions.

@0xTim 0xTim added the semver-patch Internal changes only label Nov 3, 2022
@0xTim
Copy link
Member

0xTim commented Nov 3, 2022

Original Comment:

Expire and Last-Modified header were encoding the hour part in 12h format (hh) instead of 24h format (HH). This results in timestamps being 12 hours off for all afternoon hours.

Reference timeformat documentation.

This PR corrects the format and adds 2 tests to parse and serialise.

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Thanks!

@0xTim 0xTim merged commit 0eacdf3 into vapor:main Nov 3, 2022
@VaporBot
Copy link
Contributor

VaporBot commented Nov 3, 2022

These changes are now available in 4.67.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants