You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/11/01 15:28:27 UTC
(tomcat) branch 8.5.x updated: BZ 66875. jakarta.servlet.error.exception shouldn't start error handling
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 37789ecd15 BZ 66875. jakarta.servlet.error.exception shouldn't start error handling
37789ecd15 is described below
commit 37789ecd1551585f812b2b00a9b6b0620f53ae21
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 b08d6f2833..e1e077a2b4 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 2340769f7a..cf93ace6ef 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org