Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WICKET-7075: Only support headers on uncommitted response #652

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

jsteenbeeke
Copy link
Contributor

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 PR modifies ServletWebResponse to check if the underlying HttpServletResponse has already been committed.

Copy link
Member

@martin-g martin-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a JIRA ticket for the changelog

@jsteenbeeke
Copy link
Contributor Author

@martin-g certainly, though I don't believe I have an account for the ASF JIRA yet so this may take a bit

@martin-g
Copy link
Member

We/I can help with the creation of the ticket if you like!
But 9.15 has been just released so we have time until the next release :-)

@jsteenbeeke
Copy link
Contributor Author

I've only run into this problem with the milestone 1 release for version 10 when run on Jetty 12 though, so the 9.x releases are somewhat less relevant to my situation I suppose.

So thanks for the offer, but it's probably best if I create the ticket myself so I include all relevant background information.

@jsteenbeeke
Copy link
Contributor Author

I've created https://issues.apache.org/jira/browse/WICKET-7075. I'll amend the commit to include the ticket number

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.
@jsteenbeeke jsteenbeeke changed the title Only support headers on uncommitted response WICKET-7075: Only support headers on uncommitted response Sep 19, 2023
@martin-g martin-g merged commit de89eb6 into apache:master Sep 20, 2023
3 checks passed
@martin-g
Copy link
Member

Thank you, @jsteenbeeke !

martin-g pushed a commit that referenced this pull request Jan 23, 2024
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.

(cherry picked from commit de89eb6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants