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 df42109be8ecbf96339f985d7bf193a524bf05ec
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]

Reply via email to