This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 276e04f3d5 BZ 66875. jakarta.servlet.error.exception shouldn't start error handling 276e04f3d5 is described below commit 276e04f3d5ddab68914be9234bdca8fc06bf6412 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Nov 1 15:25:44 2023 +0000 BZ 66875. jakarta.servlet.error.exception shouldn't start error handling --- java/org/apache/catalina/connector/CoyoteAdapter.java | 4 ++-- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java index edad0edc84..a85c703d81 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -233,8 +233,8 @@ public class CoyoteAdapter implements Adapter { if (request.isAsyncDispatching()) { connector.getService().getContainer().getPipeline().getFirst().invoke(request, response); - Throwable t = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION); - if (t != null) { + if (response.isError()) { + Throwable t = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION); asyncConImpl.setErrorState(t, true); } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index edac7d0e60..b80ed9ee7e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -129,6 +129,11 @@ <bug>67926</bug>: <code>PEMFile</code> prints unidentifiable string representation of ASN.1 OIDs. (michaelo) </update> + <fix> + <bug>66875</bug>: Ensure that setting the request attribute + <code>jakarta.servlet.error.exception</code> is not sufficient to + trigger error handling for the current request and response. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org