This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new e8ac86a4d4 Fix failing tests
e8ac86a4d4 is described below
commit e8ac86a4d48382a8469c4b5cf6115b5ac7b0e74c
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 6 13:48:14 2026 +0000
Fix failing tests
---
java/org/apache/catalina/mapper/Mapper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/mapper/Mapper.java
b/java/org/apache/catalina/mapper/Mapper.java
index 79f158824d..0b8a596fc7 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -750,7 +750,7 @@ public final class Mapper {
boolean trailingPeriodRemoved = false;
MappedHost mappedHost = null;
try {
- if (host.charAt(host.length() - 1) == '.') {
+ if (host.length() > 0 && host.charAt(host.length() - 1) == '.') {
host.setEnd(host.getEnd() - 1);
trailingPeriodRemoved = true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]