Anonymous committed bb827db

CACHE-116: don't send the last modified header "Wed, 31 Dec 1969 23:59:59 GMT" , if no header is set.

Comments (0)

Files changed (1)


     private String contentType = null;
     private String contentEncoding = null;
     private byte[] content = null;
-    // setting a default last modified value based on object creation
-    private long lastModified = System.currentTimeMillis();
+    private long lastModified = -1;
      * Set the content type. We capture this so that when we serve this
-        if (response instanceof HttpServletResponse) {
+        if ((lastModified != -1) && (response instanceof HttpServletResponse)) {
             ((HttpServletResponse) response).setDateHeader(CacheFilter.HEADER_LAST_MODIFIED, lastModified);
         if (locale != null) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.