arturobernalg opened a new pull request, #1152:
URL: https://github.com/apache/tomcat/pull/1152

   RFC 9110, section 8.8.2.1: "An origin server with a clock MUST NOT generate 
a Last-Modified date that is later than the server's time of message 
origination (Date). If the last modification time is derived from 
implementation-specific metadata that evaluates to some time in the future, 
according to the origin server's clock, then the origin server MUST replace 
that value with the message origination date."
   
   `AbstractResource.getLastModifiedHttp()` formatted the last modified time of 
the resource as is. On a running server, a file whose modification time was 
2031-01-01 was served with `Last-Modified: Tue, 31 Dec 2030 23:00:00 GMT` and 
`Date: Fri, 06 Nov 2026 11:41:36 GMT`.
   
   The time is now limited to the current time. With the change the same file 
is served with `Last-Modified` equal to `Date`, and a file with a modification 
time in the past is not changed. The value used by the preconditions 
(`If-Modified-Since`, `If-Range`) is not changed.
   
   `TestDefaultServlet.testLastModifiedNotInFuture` fails without the change 
(`Last-Modified is later than Date`). `TestDefaultServlet`, 
`TestDefaultServletRfc9110Section13`, `TestDefaultServletIfMatchRequests`, 
`TestDefaultServletRangeRequests`, `TestWebdavServlet` and all of the 
`webresources` tests pass, as does the full smoke profile (`ant 
-Dtest.profile=smoke deploy test-nio test-status`, 54 classes).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to