Skip to content

Commit

Permalink
For sitemesh filter chaining. Don't decorate if there is nothing to d…
Browse files Browse the repository at this point in the history
…ecorate.
  • Loading branch information
codeconsole committed Oct 8, 2024
1 parent 8d2f721 commit b9a5f1f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void preCommit() {
filterChain.doFilter(wrapRequest(request), responseBuffer);
request.setAttribute(SITEMESH_BUFFER_ATTRIBUTE, null);

if (request.getAttribute(SITEMESH_DECORATED_ATTRIBUTE) != null) {
if (request.getAttribute(SITEMESH_DECORATED_ATTRIBUTE) != null || responseBuffer.getBuffer() == null) {
return;
}
request.setAttribute(SITEMESH_DECORATED_ATTRIBUTE, true);
Expand Down

0 comments on commit b9a5f1f

Please sign in to comment.