Commits

dr...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed 3887163

Issue number: CACHE-116
Submitted by: patrick sard
Reviewed by: Andres March

Fix cachefilter to handle client requests that do not have If-Modified-Since header

  • Participants
  • Parent commits b9fc2bf

Comments (0)

Files changed (1)

File src/core/java/com/opensymphony/oscache/web/filter/CacheFilter.java

 
             long clientLastModified = httpRequest.getDateHeader("If-Modified-Since"); // will return -1 if no header...
 
-            if (clientLastModified >= respContent.getLastModified()) {
+            if (( clientLastModified != -1 ) && ( clientLastModified >= respContent.getLastModified())) { 
                 ((HttpServletResponse) response).setStatus(HttpServletResponse.SC_NOT_MODIFIED);
                 return;
             }