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 79a953129c Fix back-port
79a953129c is described below
commit 79a953129cee3bc18f83b79ff9d0c2fc53587152
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Nov 8 16:03:34 2023 +0000
Fix back-port
---
java/org/apache/catalina/connector/InputBuffer.java | 1 -
java/org/apache/catalina/core/StandardWrapperValve.java | 6 +++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/connector/InputBuffer.java
b/java/org/apache/catalina/connector/InputBuffer.java
index d16eeb9712..4ea379e6f4 100644
--- a/java/org/apache/catalina/connector/InputBuffer.java
+++ b/java/org/apache/catalina/connector/InputBuffer.java
@@ -304,7 +304,6 @@ public class InputBuffer extends Reader implements
ByteChunk.ByteInputChannel, A
*
* @throws IOException An underlying IOException occurred
*/
- @SuppressWarnings("deprecation")
@Override
public int realReadBytes() throws IOException {
if (closed) {
diff --git a/java/org/apache/catalina/core/StandardWrapperValve.java
b/java/org/apache/catalina/core/StandardWrapperValve.java
index 4106ba9a5c..82adc0d815 100644
--- a/java/org/apache/catalina/core/StandardWrapperValve.java
+++ b/java/org/apache/catalina/core/StandardWrapperValve.java
@@ -280,8 +280,12 @@ final class StandardWrapperValve extends ValveBase {
* @param exception The exception that occurred (which possibly wraps a
root cause exception
*/
private void exception(Request request, Response response, Throwable
exception) {
+ exception(request, response, exception,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ }
+
+ 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]