This is an automated email from the ASF dual-hosted git repository.
remm 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 75831f9813 Remove use of printStackTrace
75831f9813 is described below
commit 75831f981356ee81d75dac8dd0bd9ffb60f995a1
Author: remm <[email protected]>
AuthorDate: Mon Oct 2 15:17:13 2023 +0200
Remove use of printStackTrace
---
java/org/apache/tomcat/util/http/LocalStrings.properties | 1 +
java/org/apache/tomcat/util/http/Parameters.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/http/LocalStrings.properties
b/java/org/apache/tomcat/util/http/LocalStrings.properties
index 292706984a..29fd518c61 100644
--- a/java/org/apache/tomcat/util/http/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/http/LocalStrings.properties
@@ -26,6 +26,7 @@ parameters.bytes=Start processing with input [{0}]
parameters.copyFail=Failed to create copy of original parameter values for
debug logging purposes
parameters.decodeFail.debug=Character decoding failed. Parameter [{0}] with
value [{1}] has been ignored.
parameters.decodeFail.info=Character decoding failed. Parameter [{0}] with
value [{1}] has been ignored. Note that the name and value quoted here may be
corrupted due to the failed decoding. Use debug level logging to see the
original, non-corrupted values.
+parameters.duplicateFail=Failed to create copy of query parameters
parameters.emptyChunk=Empty parameter chunk ignored
parameters.invalidChunk=Invalid chunk starting at byte [{0}] and ending at
byte [{1}] with a value of [{2}] ignored
parameters.maxCountFail=More than the maximum number of request parameters
(GET plus POST) for a single request ([{0}]) were detected. Any parameters
beyond this limit have been ignored. To change this limit, set the
maxParameterCount attribute on the Connector.
diff --git a/java/org/apache/tomcat/util/http/Parameters.java
b/java/org/apache/tomcat/util/http/Parameters.java
index feb4c03e97..16995ccd55 100644
--- a/java/org/apache/tomcat/util/http/Parameters.java
+++ b/java/org/apache/tomcat/util/http/Parameters.java
@@ -161,7 +161,7 @@ public final class Parameters {
decodedQuery.duplicate(queryMB);
} catch (IOException e) {
// Can't happen, as decodedQuery can't overflow
- e.printStackTrace();
+ log.error(sm.getString("parameters.copyFail"), e);
}
processParameters(decodedQuery, queryStringCharset);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]