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/09/15 09:37:59 UTC
[tomcat] branch main updated: Use more appropriate utility class
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new c1c5b87543 Use more appropriate utility class
c1c5b87543 is described below
commit c1c5b8754355d74a96fcd8d0e5dcfcc396e9bcd1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Sep 15 10:37:40 2023 +0100
Use more appropriate utility class
---
java/org/apache/catalina/valves/ProxyErrorReportValve.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/valves/ProxyErrorReportValve.java b/java/org/apache/catalina/valves/ProxyErrorReportValve.java
index 949390bcf7..3371ee55e6 100644
--- a/java/org/apache/catalina/valves/ProxyErrorReportValve.java
+++ b/java/org/apache/catalina/valves/ProxyErrorReportValve.java
@@ -31,12 +31,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
+import org.apache.catalina.util.IOTools;
import org.apache.coyote.ActionCode;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.descriptor.web.ErrorPage;
-import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.apache.tomcat.util.res.StringManager;
/**
@@ -209,7 +209,7 @@ public class ProxyErrorReportValve extends ErrorReportValve {
response.setContentLength(httpURLConnection.getContentLength());
OutputStream outputStream = response.getOutputStream();
InputStream inputStream = url.openStream();
- IOUtils.copy(inputStream, outputStream);
+ IOTools.flow(inputStream, outputStream);
} catch (URISyntaxException | IOException | IllegalArgumentException e) {
if (log.isDebugEnabled()) {
log.debug("Proxy error to " + urlString, e);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org