public boolean isModified(String etag, long lastModified, RouteContext routeContext) { final String browserEtag = routeContext.getHeader(HttpConstants.Header.IF_NONE_MATCH); if (browserEtag != null && !StringUtils.isNullOrEmpty(etag)) { return !(browserEtag.equals(etag)); } final String ifModifiedSince = routeContext.getHeader(HttpConstants.Header.IF_MODIFIED_SINCE); if ((lastModified > 0) && !StringUtils.isNullOrEmpty(ifModifiedSince)) { try { Date browserDate = DateUtils.parseHttpDateFormat(ifModifiedSince); if (browserDate.getTime() >= lastModified) { return false; } } catch (ParseException e) { log.warn("Can't parse HTTP date", e); } } return true; }