This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new f4ab97cbe9 Fix BZ 67235 - fix NPE on dispatch from AsyncListener.onError f4ab97cbe9 is described below commit f4ab97cbe95dd84b8229336d46e0b24243d3fabb Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Sep 8 18:34:36 2023 +0100 Fix BZ 67235 - fix NPE on dispatch from AsyncListener.onError --- java/org/apache/catalina/connector/CoyoteAdapter.java | 7 +++---- webapps/docs/changelog.xml | 9 +++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java index b4f28fbffb..6a32e26948 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -249,10 +249,9 @@ public class CoyoteAdapter implements Adapter { AtomicBoolean error = new AtomicBoolean(false); res.action(ActionCode.IS_ERROR, error); if (error.get()) { - if (request.isAsyncCompleting()) { - // Connection will be forcibly closed which will prevent - // completion happening at the usual point. Need to trigger - // call to onComplete() here. + if (request.isAsyncCompleting() || request.isAsyncDispatching()) { + // Connection will be forcibly closed which will prevent completion/dispatch happening at the usual + // point. Trigger post processing here. res.action(ActionCode.ASYNC_POST_PROCESS, null); } success = false; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 72bff93758..247a63c4cc 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -113,6 +113,15 @@ </fix> </changelog> </subsection> + <subsection name="Coyote"> + <changelog> + <fix> + <bug>67235</bug>: Fix a <code>NullPointerException</code> when an + <code>AsyncListener</code> handles an error with a dispatch rather than + a complete. (markt) + </fix> + </changelog> + </subsection> </section> <section name="Tomcat 10.1.13 (markt)" rtext="2023-08-25"> <subsection name="Catalina"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org