Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

StandardApiVersionDeprecationHandler writes a Sunset value that is not an IMF-fixdate for days 1 to 9

Open Beginner friendly
#37,613 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
87/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java, spring
Domain
api

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

status: waiting-for-triage

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-projects/spring-framework

All issues in spring-projects/spring-framework

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.