This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 528a5b08835f9e74ec919e816c7ccfc3c438323e Author: opencode <[email protected]> AuthorDate: Wed Sep 30 10:51:55 2026 +0200 Record an error in CoyoteWriter.close() when the underlying OutputBuffer close fails, rather than swallowing the IOException silently, so checkError() reflects the failure --- java/org/apache/catalina/connector/CoyoteWriter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/connector/CoyoteWriter.java b/java/org/apache/catalina/connector/CoyoteWriter.java index 0cfc488aa8..06a41338ed 100644 --- a/java/org/apache/catalina/connector/CoyoteWriter.java +++ b/java/org/apache/catalina/connector/CoyoteWriter.java @@ -111,12 +111,16 @@ public class CoyoteWriter extends PrintWriter { @Override public void close() { + if (error) { + return; + } + // We don't close the PrintWriter - super() is not called, // so the stream can be reused. We close ob. try { ob.close(); - } catch (IOException ignore) { - // Ignore + } catch (IOException ioe) { + setErrorException(ioe); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
