Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
10.0.0-M1
-
None
-
Jetty 12
Description
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.
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.
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 for this solution.
Attachments
Issue Links
- is a parent of
-
WICKET-7097 ServletWebResponse allows writing headers to committed HttpServletResponse
- Resolved