Skip to content

Commit

Permalink
WICKET-7075: Headers require uncommitted response (#652)
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 authored Sep 20, 2023
1 parent e8703a7 commit de89eb6
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 de89eb6

Please sign in to comment.