Skip to content

Conversation

@gregw
Copy link
Contributor

@gregw gregw commented Dec 17, 2025

Fixes #13670 as an alternate to #13678

Use the existing HttpException mechanism. Perhaps BadMessageException could be deprecated.
Prefer HttpException.IllegalStateException over BadMessageException, to not generate the wrong exception type in the first place.

janbartel
janbartel previously approved these changes Dec 18, 2025
Copy link
Contributor

@janbartel janbartel left a comment

Choose a reason for hiding this comment

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

Looks good, niggle about the javadoc as per comment.

/**
* <p>Exception thrown to indicate a Bad HTTP Message has either been received
* or attempted to be generated. Typically these are handled with either 400
* or attempted to be generated. Typically, these are handled with either 400
Copy link
Contributor

Choose a reason for hiding this comment

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

Either doesn't make sense here unless another way of handling them other than a 400 response is listed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, is now the only reason to keep this class is ee < 11 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now bigger than Ben Hur!

Fixes #13670 as an alternate to #13678
Fully deprecate and replace BadMessageException
@gregw gregw requested a review from janbartel December 18, 2025 12:23
@joakime joakime changed the title Fix/12.1.x/13670/servlet getparameter ise alt Issue #13670 - Returning ISE in all getParameter use cases outlined by Servlet 6.1 spec Dec 18, 2025
@joakime joakime moved this to 👀 In review in Jetty 12.1.6 Dec 18, 2025
@joakime joakime added Bug For general bugs on Jetty side Specification For all industry Specifications (IETF / Servlet / etc) labels Dec 18, 2025
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 Specification For all industry Specifications (IETF / Servlet / etc)

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

jetty-ee11-servlet getParameter does not throw IllegalStateException

3 participants