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

EE9 Servlet API throws exceptions in normal control flow #12775

Open
bjorncs opened this issue Feb 6, 2025 · 1 comment · May be fixed by #12789
Open

EE9 Servlet API throws exceptions in normal control flow #12775

bjorncs opened this issue Feb 6, 2025 · 1 comment · May be fixed by #12789
Labels
Bug For general bugs on Jetty side

Comments

@bjorncs
Copy link
Contributor

bjorncs commented Feb 6, 2025

Jetty version(s)
12.0.16

Jetty Environment
Embedded + EE9

Java version/vendor (use: java -version)
openjdk version "17.0.14" 2025-01-21 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.14.0.7-1) (build 17.0.14+7-LTS, mixed mode, sharing)

OS type/version
AlmaLinux 8

Description
The method org.eclipse.jetty.ee9.nested.Request.getInputStream() attempts to write a 100 Continue interim response when invoked for the first time. If a 100 isn’t expected, the underlying HttpChannelState.ChannelResponse.writeInterim() method generates an IllegalArgumentException, which is ignored in this code path. However, this can be costly when -XX:-OmitStackTraceInFastThrow is used in production. This wasn’t the case for Jetty 11, causing a larger regression in request throughput when upgrading from 11.0 to 12.0.

Image

Reproduce:
Send a simple HTTP/2 or HTTP/1.1 GET request without Expect: 100-continue header to Jetty using EE9 Servlet API.

@bjorncs bjorncs added the Bug For general bugs on Jetty side label Feb 6, 2025
@janbartel
Copy link
Contributor

See PR #12789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants