protected boolean modified(long lastModified) {
        long since = getRequest().getDateHeader("If-Modified-Since");
        if (since < (lastModified / 1000 * 1000)) {
            getResponse().setDateHeader("Last-Modified", lastModified);
            return true;
        } else {
            getResponse().setStatus(HttpServletResponse.SC_NOT_MODIFIED);
            return false;
        }
    }