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

Undisable ee9 BlockingTest and fix HttpChannel.produceContent #12529

Open
wants to merge 1 commit into
base: jetty-12.1.x
Choose a base branch
from

Conversation

janbartel
Copy link
Contributor

HttpChannel.produceContent throws NPE if the core request has already been finished when it is called. This caused some of the BlockingTests to fail.

@janbartel janbartel requested a review from gregw November 13, 2024 06:28
@janbartel janbartel self-assigned this Nov 13, 2024
@janbartel janbartel mentioned this pull request Nov 13, 2024
38 tasks
Comment on lines +175 to +177
ContextHandler.CoreContextRequest coreContextRequest = getCoreRequest();
if (coreContextRequest == null)
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

@lorban is this reasonable?

Copy link
Contributor

@lorban lorban Nov 15, 2024

Choose a reason for hiding this comment

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

coreContextRequest can only be null after recycle(), so returning null in this case is wrong as that implies a call to demand() should follow.

I think returning an new ErrorContent(new IllegalStateException("Illegal read from complete request")) would be the right thing to do when coreContextRequest is null.

@gregw gregw requested a review from lorban November 14, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants