-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fixes for Response.writeError with servlet error dispatch #12698
base: jetty-12.1.x
Are you sure you want to change the base?
Conversation
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
@lachlan-roberts this is quite a hefty refactor of |
@janbartel I have aligned the EE10 ErrorHandler with changes from the EE11 one. I think maybe the changes can be reduced, but I wanted the EE10 If we really don't want to change the EE10 |
jetty-core/jetty-security/src/main/java/org/eclipse/jetty/security/AuthenticationState.java
Outdated
Show resolved
Hide resolved
jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler.java
Show resolved
Hide resolved
Signed-off-by: Lachlan Roberts <[email protected]>
@gregw @janbartel ready for review |
See issue #12697
Doing a
Response.writeError()
will try to invoke the servlet ErrorHandler, which can do an ERROR dispatch. This does not work properly if it is not done from within the scope of theServletChannel
.ErrorHandler
implementations to stop dispatching to error pages unless we have already started theServletChannel
.Authenticator
s now use theServletChannel
mechanism to do asendError()
when theServletChannel
starts handling the request. It uses a new static methodErrorHandler.writeError
which is overriden by the servletErrorHandler
s.