Skip to content

Commit

Permalink
Only support headers on uncommitted response
Browse files Browse the repository at this point in the history
CrossOriginOpenerPolicyRequestCycleListener attempts to write headers to
a response that is already committed. It contains logic to prevent
setting of headers when a response does not support them, but the
implementation for ServletWebResponse always returns true.

This commit modifies ServletWebResponse to check if the underlying
HttpServletResponse has already been committed.
  • Loading branch information
jsteenbeeke committed Sep 18, 2023
1 parent fc54101 commit f05d29e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void setDateHeader(String name, Instant date)
@Override
public boolean isHeaderSupported()
{
return true;
return !httpServletResponse.isCommitted();
}

@Override
Expand Down

0 comments on commit f05d29e

Please sign in to comment.