This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 83e0bb96f559740d4e4364b537db19c6956781bb Author: opencode <[email protected]> AuthorDate: Wed Oct 7 11:39:55 2026 +0200 Stop rendering the host list page twice in the HTML host manager For a POST request with an unknown command, doPost handed the request off to doGet - which renders the full page and closes the response writer - and then rendered the list page a second time. The second document was written to the closed output buffer and silently discarded. Return after delegating to doGet, matching the long-standing pattern in the sibling HTMLManagerServlet, so nothing is rendered after the delegated GET handling. --- java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java b/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java index 4447c3fd37..de9d3cc150 100644 --- a/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java +++ b/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java @@ -120,8 +120,11 @@ public class HTMLHostManagerServlet extends HostManagerServlet { } else if (command.equals("/persist")) { message = persist(smClient); } else { - // Try GET + // Try GET. The GET handling renders the response in full, so + // nothing must be rendered afterwards to avoid writing a second + // document on the closed writer. doGet(request, response); + return; } list(request, response, message, smClient); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
