diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java index 7d55cf1c3ffc..c9982054eac8 100644 --- a/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/java/org/apache/catalina/servlets/DefaultServlet.java @@ -2183,7 +2183,7 @@ protected boolean checkIfModifiedSince(HttpServletRequest request, HttpServletRe } long resourceLastModified = resource.getLastModified(); - if (resourceLastModified <= -1) { + if (resourceLastModified <= 0) { // MUST ignore if the resource does not have a modification date available. return true; } @@ -2315,7 +2315,7 @@ protected boolean checkIfUnmodifiedSince(HttpServletRequest request, HttpServlet WebResource resource) throws IOException { long resourceLastModified = resource.getLastModified(); - if (resourceLastModified <= -1) { + if (resourceLastModified <= 0) { // MUST ignore if the resource does not have a modification date available. return true; }