// If an If-None-Match header has been specified, if modified since
// is ignored.
if ((request.getHeader("If-None-Match") == null)
- && (lastModified <= headerValue + 1000)) {
+ && (lastModified < headerValue + 1000)) {
// The entity has not been modified since the date
// specified by the client. This is not an error case.
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
long lastModified = resourceAttributes.getLastModified();
long headerValue = request.getDateHeader("If-Unmodified-Since");
if (headerValue != -1) {
- if ( lastModified > (headerValue + 1000)) {
+ if ( lastModified >= (headerValue + 1000)) {
// The entity has not been modified since the date
// specified by the client. This is not an error case.
response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
<subsection name="Catalina">
<changelog>
<fix>
+ <bug>41666</bug> Correct handling of boundary conditions for
+ If-Unmodified-Since and If-Modified-Since headers. Patch provided by
+ Suzuki Yuichiro. (markt)
+ </fix>
+ <fix>
<bug>41739</bug> Correct handling of servlets with a load-on-startup
value of zero. These are now the first servlets to be started. (markt)
</fix>
when the serviet is reading/writing from the input/output streams
The flag is <code>-Dorg.apache.tomcat.util.net.NioSelectorShared=true</code>
</update>
+ <fix>
+ Requests with multiple content-length headers are now rejected. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Webapps">