-
Notifications
You must be signed in to change notification settings - Fork 856
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
if-modified-since
header should use GMT
instead of -0000
#8747
Comments
RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1: |
I responded here with a bit more on the datetime side of things. This PR adds a new API to Jiff to make it easy to print RFC 9110 compatible timestamps. So once that's released, we just need to update uv to use that new API and I believe this should be fixed.
One clarification here is that the existing format is not in local time. It is semantically equivalent to GMT. It's using (The other difference is that RFC 9110 requires a two digit day. This makes the value fixed length.) |
This still utilizes the RFC 2822 datetime formatter, but utilizes new methods [added in jiff 0.1.14] to emit timestamps in a format strictly compatible with RFC 9110. It seems like most HTTP servers were pretty flexible and supported RFC 2822 datetime formats, but #8747 shows at least one case where that isn't true. Given that the [MDN docs prescribe RFC 9110], we defer to them. Fixes #8747 [added in jiff 0.1.14]: BurntSushi/jiff#154 [MDN docs prescribe RFC 9110]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
I just copied the whole sentence, sorry for the ambiguity, I checked the time and the package was modified at the right time ( Thanks for the quick fix, it's one of the reasons why I love uv! |
uv lock -U
uses our internal registry, backed by Tencent COS.error log:
The issue is that COS reported: The
If-Modified-Since
you specified is not valid.I checked the request header sent by UV, and it appears as follows:
if-modified-since: Wed, 17 Jul 2024 03:39:18 -0000
.According to the MDN documentation, HTTP dates should always be expressed in
GMT
, not in local time.Therefore, uv should adjust the header value to something like:
if-modified-since: Wed, 17 Jul 2024 03:39:18 GMT
.The text was updated successfully, but these errors were encountered: