mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 22:59:03 +00:00
Prior to this change, calling the `setDateHeader` method on a MockHttpServletResponse instance (internal implementation for testing the spring-web module) would just store the given long value in a Map, not writing it as a formatted date String. This can be problematic when testing features related to date headers such as "Expires", "If-Modified-Since", "Last-Modified", etc. This commit formats long dates into date Strings using the date format recommended by the RFC and the GMT time zone.