Fix condition in ServletInvocableHandlerMethod

Closes gh-23775
This commit is contained in:
Rossen Stoyanchev
2019-11-06 15:36:25 +00:00
parent 38a1caefb8
commit 2e4944198d
2 changed files with 19 additions and 2 deletions

View File

@@ -165,7 +165,7 @@ public class ServletInvocableHandlerMethod extends InvocableHandlerMethod {
}
private void disableContentCachingIfNecessary(ServletWebRequest webRequest) {
if (!isRequestNotModified(webRequest)) {
if (isRequestNotModified(webRequest)) {
HttpServletResponse response = webRequest.getNativeResponse(HttpServletResponse.class);
Assert.notNull(response, "Expected HttpServletResponse");
if (StringUtils.hasText(response.getHeader("ETag"))) {