This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 61c552e27b Fix failing tests
61c552e27b is described below

commit 61c552e27b1957bc61a78fe66ccab77aafa2ccfc
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]

Reply via email to