Commits

Anonymous committed b10a497

set last modified header by default
Issue number: CACHE-169
Submitted by: Lars Torunski

Comments (0)

Files changed (1)

src/core/java/com/opensymphony/oscache/web/filter/CacheHttpServletResponseWrapper.java

         super(response);
         result = new ResponseContent();
         this.fragment = fragment;
+        
+        // setting a default last modified value based on object creation and remove the millis
+        long current = System.currentTimeMillis() / 1000;
+        result.setLastModified(current * 1000);
+        super.setDateHeader(CacheFilter.HEADER_LAST_MODIFIED, result.getLastModified());
     }
 
     /**