This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new efd289cd64 Add debug logging for exceptions when parsing parts efd289cd64 is described below commit efd289cd643273a2fe19b78d216996bdc49d5df9 Author: remm <r...@apache.org> AuthorDate: Tue Jun 24 14:50:49 2025 +0200 Add debug logging for exceptions when parsing parts It is possible that frameworks swallow exceptions. --- java/org/apache/catalina/connector/LocalStrings.properties | 1 + java/org/apache/catalina/connector/Request.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/java/org/apache/catalina/connector/LocalStrings.properties b/java/org/apache/catalina/connector/LocalStrings.properties index 13705a1186..b3b94d5c1f 100644 --- a/java/org/apache/catalina/connector/LocalStrings.properties +++ b/java/org/apache/catalina/connector/LocalStrings.properties @@ -62,6 +62,7 @@ coyoteRequest.maxPostSizeExceeded=The multi-part request contained parameter dat coyoteRequest.noAsync=Unable to start async because the following classes in the processing chain do not support async [{0}] coyoteRequest.noMultipartConfig=Unable to process parts as no multi-part configuration has been provided coyoteRequest.parseParameters=Exception thrown whilst processing POSTed parameters +coyoteRequest.partsParseException=Exception [{0}] occurred parsing parts and will be thrown coyoteRequest.postTooLarge=Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs. coyoteRequest.sendfileNotCanonical=Unable to determine canonical name of file [{0}] specified for use with sendfile coyoteRequest.sessionCreateCommitted=Cannot create a session after the response has been committed diff --git a/java/org/apache/catalina/connector/Request.java b/java/org/apache/catalina/connector/Request.java index 74b45f9558..dfab466afd 100644 --- a/java/org/apache/catalina/connector/Request.java +++ b/java/org/apache/catalina/connector/Request.java @@ -2536,6 +2536,10 @@ public class Request implements HttpServletRequest { parseParts(true); if (partsParseException != null) { + Context context = getContext(); + if (context != null && context.getLogger().isDebugEnabled()) { + context.getLogger().debug(sm.getString("coyoteRequest.partsParseException", partsParseException.getMessage())); + } if (partsParseException instanceof IOException) { throw (IOException) partsParseException; } else if (partsParseException instanceof IllegalStateException) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org