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 d1fc93aeb5 Fix back-port
d1fc93aeb5 is described below
commit d1fc93aeb5884c358058f1afedfc1b2669addfd8
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Nov 8 16:03:34 2023 +0000
Fix back-port
---
java/org/apache/catalina/core/StandardWrapperValve.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/core/StandardWrapperValve.java
b/java/org/apache/catalina/core/StandardWrapperValve.java
index 4811dae76c..94f0738f56 100644
--- a/java/org/apache/catalina/core/StandardWrapperValve.java
+++ b/java/org/apache/catalina/core/StandardWrapperValve.java
@@ -279,10 +279,14 @@ final class StandardWrapperValve extends ValveBase {
* @param response The response being generated
* @param exception The exception that occurred (which possibly wraps a
root cause exception
*/
- @SuppressWarnings("deprecation")
private void exception(Request request, Response response, Throwable
exception) {
+ exception(request, response, exception,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ }
+
+ @SuppressWarnings("deprecation")
+ private void exception(Request request, Response response, Throwable
exception, int errorCode) {
request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, exception);
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ response.setStatus(errorCode);
response.setError();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]