response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return false;
}
- else {
- if (ifNoneMatch.equals(eTag)) {
- log.debug("ETag {} not changed: 304 {}", ifNoneMatch, request.getRequestURI());
- response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
- return false;
- }
- }
+ }
+
+ if (ifNoneMatch != null && ifNoneMatch.equals(eTag)) {
+ log.debug("{}: ETag {} not changed -> 304 ", request.getRequestURI(), ifNoneMatch);
+ response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+ return false;
}
/** HTTP/1.1-Caching-Header richtig setzen!! */