This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-spring-boot-4.8.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.8.x by
this push:
new a36580453a8 CAMEL-22116: Make it possible for SB to provide special
logic in getRawPath
a36580453a8 is described below
commit a36580453a890f3bad13ef42a460b5b1abc92973
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 d5e493a28b4..98d0943d242 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
@@ -216,4 +216,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());
+ }
}