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

thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d65906bf TAP5-2810: fixing EsSihmDispatcher when context path isn't /
7d65906bf is described below

commit 7d65906bfedbbf0c0bd7e2b7ac052ea707bf9419
Author: Thiago H. de Paula Figueiredo <[email protected]>
AuthorDate: Sat Jul 4 17:57:32 2026 -0300

    TAP5-2810: fixing EsSihmDispatcher when context path isn't /
---
 .../tapestry5/internal/services/javascript/EsShimDispatcher.java  | 8 +++-----
 .../org/apache/tapestry5/services/javascript/EsShimManager.java   | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/EsShimDispatcher.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/EsShimDispatcher.java
index 8d9b5ebab..373eda31c 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/EsShimDispatcher.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/EsShimDispatcher.java
@@ -82,7 +82,7 @@ public class EsShimDispatcher implements Dispatcher
             throw new RuntimeException(e);
         }
 
-        requestPrefix = esShimManager.getRequestPrefix(compress);
+        requestPrefix = esShimManager.getDispatcherUrlPrefix(compress);
         requestPrefixLength = requestPrefix.length();
     }
 
@@ -90,11 +90,9 @@ public class EsShimDispatcher implements Dispatcher
     {
         String path = request.getPath();
         
-        int index = path.indexOf(requestPrefix);
-
-        if (index >= 0)
+        if (path.startsWith(requestPrefix))
         {
-            String extraPath = path.substring(index + requestPrefixLength);
+            String extraPath = path.substring(requestPrefix.length());
 
             if (!handleModuleRequest(extraPath, response))
             {
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/EsShimManager.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/EsShimManager.java
index f9d5c5f13..de4a17e46 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/EsShimManager.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/EsShimManager.java
@@ -37,7 +37,7 @@ public interface EsShimManager
      * @param compress a {@code boolean} to inform whether it's the compressed 
asset URL or not.
      * @return the request prefix.
      */
-    String getRequestPrefix(boolean compress);
+    String getDispatcherUrlPrefix(boolean compress);
     
     /**
      * Returns the full URL of a module.

Reply via email to