Repository navigation
Parse Last-Modified with a single-digit day - #857
Conversation
plugins.gradle.org sends Last-Modified without the leading zero on
the day ("Tue, 8 Apr 2025 19:09:23 GMT"). http.ParseTime rejects it,
so Maven cooldown treated a plugin version published on the 1st to
9th of a month as undated and let it through. Taking the time from a
downloaded .pom failed the same way, which cost an extra HEAD.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
plugins.gradle.org sends
Last-Modifiedwithout the leading zero on the day:http.ParseTimerejects that, so Maven cooldown treats a plugin version published on the 1st to 9th of a month as undated, which lets it through.A server that runs with
cooldown.default: "3650d"should reject a 1.8 year old version, but currently doesn't:This change modifies the code to accept the unpadded day as well, both for the HEAD of a
.pom, and for the time taken from a downloaded.pom.TestMavenCooldownSingleDigitDayfails on main (200 instead of 403) and passes with this change.Summary by CodeRabbit