return request.getHeader("If-None-Match");
}
public void process(FilterChain chain, Request request, Response response) {
Request.Method method = request.getMethod();
HttpManager manager = chain.getHttpManager();
if (Request.Method.GET == method
&& StringUtils.isNotBlank(getIfNoneMatchHeader())) {
try {
process(manager, request, response);
} catch (BadRequestException ex) {
log.warn("BadRequestException: " + ex.getReason());
manager.getResponseHandler().respondBadRequest(
ex.getResource(), response, request);
} catch (ConflictException ex) {
log.warn("conflictException: " + ex.getMessage());
manager.getResponseHandler().respondConflict(ex.getResource(),
response, request, INTERNAL_SERVER_ERROR_HTML);
} catch (NotAuthorizedException ex) {
log.warn("NotAuthorizedException");
manager.getResponseHandler().respondUnauthorised(
ex.getResource(), response, request);
} catch (Throwable e) {
log.error("process", e);
try {
manager.getResponseHandler().respondServerError(request,
response, INTERNAL_SERVER_ERROR_HTML);
} catch (Throwable ex) {
log
.error(
"Exception generating server error response, setting response status to 500",