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 7ad3ae948ad5bf178c378e7b7a911effbfe48a59 Author: opencode <[email protected]> AuthorDate: Wed Oct 7 12:14:13 2026 +0200 Pass the normalized default host name to the mapper in StandardEngine setDefaultHost() stored a lower-cased copy of its argument in the engine field but handed the raw argument to the mapper when the engine was already running. The mapper resolves the default host name case-sensitively, while StandardHost lower-cases all host names and aliases it registers, so a runtime update with a differently cased name, for example through JMX, resolved to no host and silently dropped the default host fallback until the next restart. Pass the stored, normalized value, so the runtime update behaves like the start-up lookup in MapperListener, which reads the same field. --- java/org/apache/catalina/core/StandardEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/StandardEngine.java b/java/org/apache/catalina/core/StandardEngine.java index 506e4e0386..a4b63a745a 100644 --- a/java/org/apache/catalina/core/StandardEngine.java +++ b/java/org/apache/catalina/core/StandardEngine.java @@ -117,7 +117,7 @@ public class StandardEngine extends ContainerBase implements Engine { this.defaultHost = host.toLowerCase(Locale.ENGLISH); } if (getState().isAvailable()) { - service.getMapper().setDefaultHostName(host); + service.getMapper().setDefaultHostName(this.defaultHost); } support.firePropertyChange("defaultHost", oldDefaultHost, this.defaultHost); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
