1. opensymphony
  2. oscache

Commits

ltor...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed b10a497

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

  • Participants
  • Parent commits 3d1c393
  • Branches default

Comments (0)

Files changed (1)

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

View file
         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());
     }
 
     /**