[ https://issues.apache.org/jira/browse/WICKET-7075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov resolved WICKET-7075. ----------------------------------------------- Fix Version/s: 10.0.0-M3 Assignee: Martin Tzvetanov Grigorov Resolution: Fixed > ServletWebResponse allows writing headers to committed HttpServletResponse > -------------------------------------------------------------------------- > > Key: WICKET-7075 > URL: https://issues.apache.org/jira/browse/WICKET-7075 > Project: Wicket > Issue Type: Bug > Components: wicket-core > Affects Versions: 10.0.0-M1 > Environment: Jetty 12 > Reporter: Jeroen Steenbeeke > Assignee: Martin Tzvetanov Grigorov > Priority: Minor > Fix For: 10.0.0-M3 > > > h2. Background > I'm in the progress of migrating a number of Wicket projects to Jakarta > namespaced libraries. Due to dependencies outside of Wicket requiring Servlet > API version 6, I ended up using Jetty 12 as a servlet container. > h2. Problem > When running on Jetty 12, {{CrossOriginOpenerPolicyRequestCycleListener}} > attempts to set headers on a response that has already been committed, > resulting in an {{{}UnsupportedOperationException{}}}. > This does not appear to affect the application's basic operation, other than > polluting the logs with stacktraces. > h2. Proposed solution > The current implementation of {{CrossOriginOpenerPolicyRequestCycleListener}} > already checks the {{{}WebResponse{}}}'s {{isHeaderSupported}} method to see > if headers can be set, but the implementation of {{ServletWebResponse}} > always returns true. By modifying this implementation to check the underlying > {{HttpServletResponse}} if the response has been committed we can make this > check work as intended. > I have submitted a [PR|https://github.com/apache/wicket/pull/652] for this > solution. -- This message was sent by Atlassian Jira (v8.20.10#820010)