StandardApiVersionDeprecationHandler writes a Sunset value that is not an IMF-fixdate for days 1 to 9
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 87/100
Research direction
Start with StandardApiVersionDeprecationHandler.VersionInfo#withSunsetDate and compare its date formatting with the HttpHeaders#setZonedDateTime path mentioned in the issue. Check the case where the sunset date is on day 1; done means the generated Sunset value uses a two-digit day, such as Wed, 01 Jul 2099 00:00:00 GMT.
Written by the indexing model from the issue text.
Description
Affects: spring-web 7.0.9
StandardApiVersionDeprecationHandler.VersionInfo#withSunsetDate formats the date with
DateTimeFormatter.RFC_1123_DATE_TIME. That formatter prints the day of month without padding, so a sunset on
the first nine days of a month is written as:
Sunset: Wed, 1 Jul 2099 00:00:00 GMT
RFC 8594 section 3 defines Sunset = HTTP-date, and RFC 9110 section 5.6.7 requires a sender to generate the
IMF-fixdate format, where day = 2DIGIT:
Sunset: Wed, 01 Jul 2099 00:00:00 GMT
Recipients are lenient, but a strict parser or a header check fails on these dates. Formatting the value the same
way as HttpHeaders#setZonedDateTime (the Expires and Last-Modified path) would fix it.
Steps:
StandardApiVersionDeprecationHandler handler = new StandardApiVersionDeprecationHandler();
handler.configureVersion("1").setSunsetDate(ZonedDateTime.of(2099, 7, 1, 0, 0, 0, 0, ZoneOffset.UTC));
// a request resolved to version 1 gets "Sunset: Wed, 1 Jul 2099 00:00:00 GMT"
Expected: Sunset: Wed, 01 Jul 2099 00:00:00 GMT
- Dominant language
- Java
- Stars
- 60.3k
- Forks
- 38.7k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 36
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spring-projects/spring-framework
-
status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spring-projects/spring-framework#37614 ·
Maintainers usually reply within 1 day
-
in: core status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
spring-projects/spring-framework#37612 ·
Maintainers usually reply within 1 day
-
`YamlProcessor.getFlattenedMap` with `includeEmpty` returns a `null` key for an empty root mappingMay be free again @erfannvb claimed this 11 days ago, and no pull request is open. Openstatus: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spring-projects/spring-framework#37522 · 1 comment ·
Maintainers usually reply within 1 day
-
`WebClient` with default codecs drops `ProblemDetail` extension membersMay be free again A pull request for this issue was closed without being merged. Openstatus: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spring-projects/spring-framework#37503 · 1 comment ·
Maintainers usually reply within 1 day
-
StandardApiVersionDeprecationHandler generates nonconforming Sunset HTTP datesMay be free again A pull request for this issue was closed without being merged. Openstatus: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spring-projects/spring-framework#37486 · 4 comments ·
Maintainers usually reply within 1 day
All issues in spring-projects/spring-framework
Similar issues
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
authorjapps/zerocode#808 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
quarkusio/quarkus-agent-mcp#302 ·
Maintainers usually reply within 2 days
-
build
Difficulty 1/5 Under an hour Newbie friendliness 85/100
MetricsHub/metricshub-community#1472 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day