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

Fix #11325 Content-Length checks #12622

Merged
merged 4 commits into from
Dec 12, 2024
Merged

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Dec 10, 2024

Fix #11325 by:

  • removing content-length tracking from ServletContextResponse
  • adding a setContentLengthSet field to HttpOutput

Fix #11325 by:
 + removing content-length tracking from ServletContextResponse
 + adding a setContentLengthSet field to HttpOutput
@gregw gregw requested review from sbordet and lorban December 10, 2024 06:34
Copy link
Contributor

@sbordet sbordet left a comment

Choose a reason for hiding this comment

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

Comments made for ee10, but same comments apply to ee11.

Fix #11325 by:
 + removing content-length tracking from ServletContextResponse
 + adding a setContentLengthSet field to HttpOutput
Fixed flaky tests due to thread local context left set.
@@ -1053,6 +1056,7 @@ public boolean handle(Request request, Response response, Callback callback) thr
return true;

// Past this point we are calling the downstream handler in scope.
Context lastContext = getCurrentContext();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbordet this is an unrelated change that was causing flaky tests as it was leaving the ThreadLocal context set on the main test thread!

@gregw gregw requested a review from sbordet December 10, 2024 21:48
@gregw gregw marked this pull request as draft December 11, 2024 05:44
Fix #11325 by:
 + removing content-length tracking from ServletContextResponse
 + adding a setContentLengthSet field to HttpOutput
 + added HttpOutputTest for EE10/EE11
@gregw gregw marked this pull request as ready for review December 11, 2024 10:33
@gregw gregw requested a review from joakime December 11, 2024 10:34
@gregw gregw merged commit 3188ccd into jetty-12.1.x Dec 12, 2024
10 checks passed
@gregw gregw deleted the fix/11325/contentLengthChecks branch December 12, 2024 00:13
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