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

Issue #12775 avoid unnecessary exception in getInputStream #12789

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

janbartel
Copy link
Contributor

Closes #12775

Calling request.getInputStream() causes an attempt to write a 100 Continue to the response: if the request did not contain the Expect 100 header, we create an exception and then ignore it.

This PR only attempts to write the 100 Continue iff the request has an Expect 100 header, thus saving the cpu cycles involved in creating the useless exception with stack traces etc.

sbordet
sbordet previously approved these changes Feb 12, 2025
@gregw
Copy link
Contributor

gregw commented Feb 24, 2025

@sbordet this now contains some of my work, so can you review instead of me?

@gregw gregw removed their request for review February 24, 2025 21:54
@gregw gregw self-assigned this Feb 24, 2025
@joakime joakime merged commit 8443b16 into jetty-12.0.x Feb 28, 2025
10 checks passed
@joakime joakime changed the title Issue #12775 avoid unneccesary exception in getInputStream Issue #12775 avoid unnecessary exception in getInputStream Feb 28, 2025
@joakime joakime deleted the jetty-12.0.x-12775-avoid-expect100-exception branch February 28, 2025 19:07
@joakime
Copy link
Contributor

joakime commented Feb 28, 2025

Merged all the way to jetty-12.1.x as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

EE9 Servlet API throws exceptions in normal control flow
4 participants