This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new b83c95951a Follow-up to "Reset the default host when it is removed
from the mapper"
b83c95951a is described below
commit b83c95951a05d7b65291142434898c2ad726b247
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 8 12:19:20 2026 +0100
Follow-up to "Reset the default host when it is removed from the mapper"
Clear the default first so a missed host lookup doesn't fallback to the
stale default.
---
java/org/apache/catalina/mapper/Mapper.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/mapper/Mapper.java
b/java/org/apache/catalina/mapper/Mapper.java
index dbf3aaff32..1c9ee7cddd 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -233,13 +233,12 @@ public final class Mapper {
}
MappedHost[] newHosts = new MappedHost[hosts.length - 1];
if (removeMap(hosts, newHosts, alias)) {
- hosts = newHosts;
hostMapping.getRealHost().removeAlias(hostMapping);
if (defaultHost == hostMapping) {
defaultHost = null;
}
+ hosts = newHosts;
}
-
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]