Skip to content

Commit

Permalink
0 - also indicates no modification date is available
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Dec 13, 2024
1 parent c03ef13 commit d4afa27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/org/apache/catalina/servlets/DefaultServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,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;
}
Expand Down Expand Up @@ -2438,7 +2438,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;
}
Expand Down

0 comments on commit d4afa27

Please sign in to comment.