This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 2c5c9e3a1b BZ 66875. jakarta.servlet.error.exception shouldn't start
error handling
2c5c9e3a1b is described below
commit 2c5c9e3a1b71448c388e6ee07222128401d65743
Author: Mark Thomas <[email protected]>
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 9ee688b854..087cb0cfe3 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -235,8 +235,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 9f96c43e8e..5fb8489a2b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -124,6 +124,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: [email protected]
For additional commands, e-mail: [email protected]