This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-spring-boot-4.10.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/camel-spring-boot-4.10.x by
this push:
new 0c847451246 CAMEL-22116: Make it possible for SB to provide special
logic in getRawPath
0c847451246 is described below
commit 0c847451246a8eeb81a73f5f14186b55dc504df9
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat May 31 15:43:41 2025 +0200
CAMEL-22116: Make it possible for SB to provide special logic in getRawPath
---
.../http/springboot/SpringBootPlatformHttpBinding.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpBinding.java
b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpBinding.java
index 81a976a87b4..36a7f604c90 100644
---
a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpBinding.java
+++
b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpBinding.java
@@ -294,4 +294,15 @@ public class SpringBootPlatformHttpBinding extends
DefaultHttpBinding {
}
}
}
+
+ @Override
+ protected String getRawPath(HttpServletRequest request) {
+ String uri = request.getRequestURI();
+ String contextPath = request.getContextPath() == null ? "" :
request.getContextPath();
+ String servletPath = request.getServletPath() == null ? "" :
request.getServletPath();
+ if (contextPath.isEmpty()) {
+ return servletPath;
+ }
+ return uri.substring(contextPath.length() + servletPath.length());
+ }
}