You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/01/07 17:01:46 UTC
[cxf] 01/04: It seems that the ending slash should be remved but
current code does nothing at all. (#609)
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 72aa1b27d4477dc46c4254afa7894a8b9807e3ba
Author: Fabian Barney <fa...@users.noreply.github.com>
AuthorDate: Wed Dec 4 18:23:06 2019 +0100
It seems that the ending slash should be remved but current code does nothing at all. (#609)
The following code always dows nothing at all:
address = address.substring(0, address.length());
It seems that the ending slash should be removed in some cases:
address = address.substring(0, address.length() - 1);
(cherry picked from commit e0021c47b65f9328fb57229c4b9e91fbf36d92d7)
(cherry picked from commit bfc1d712ea2d5ab32aa0f4cab532e423591fd395)
---
core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
index 907b288..51f4183 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
@@ -129,7 +129,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
if (uri != null && uri.startsWith("/")) {
if (address != null && !address.startsWith(uri)) {
if (address.endsWith("/") && address.length() > 1) {
- address = address.substring(0, address.length());
+ address = address.substring(0, address.length() - 1);
}
uri = address + uri;
}