diff --git a/java/org/apache/catalina/core/ApplicationDispatcher.java b/java/org/apache/catalina/core/ApplicationDispatcher.java index bd7f3de397d0..9a4736289ab9 100644 --- a/java/org/apache/catalina/core/ApplicationDispatcher.java +++ b/java/org/apache/catalina/core/ApplicationDispatcher.java @@ -46,6 +46,7 @@ import org.apache.catalina.connector.Response; import org.apache.catalina.connector.ResponseFacade; import org.apache.coyote.BadRequestException; +import org.apache.coyote.CloseNowException; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.res.StringManager; @@ -641,7 +642,7 @@ private void invoke(ServletRequest request, ServletResponse response, State stat filterChain.doFilter(request, response); } // Servlet Service Method is called by the FilterChain - } catch (BadRequestException e) { + } catch (BadRequestException | CloseNowException e) { ioException = e; } catch (IOException e) { wrapper.getLogger().error(sm.getString("applicationDispatcher.serviceException", wrapper.getName()), e); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 5143d645aa3a..a5b18088f356 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -168,6 +168,12 @@ some headers, as per RFC 9110, section 9.3.2, that are present in a GET request that are not present in the equivalent HEAD request. (markt) + + 69471: Log instances of CloseNowException caught + by ApplicationDispatcher.invoke() at debug level rather + than error level as they are very likely to have been caused by a client + disconnection or similar I/O issue. (markt) +