cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5575] Replacing duplicate slashes where possible
Date Mon, 24 Feb 2014 13:55:56 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 880b8d9d1 -> a2d6cb86e


[CXF-5575] Replacing duplicate slashes where possible


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a2d6cb86
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a2d6cb86
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a2d6cb86

Branch: refs/heads/master
Commit: a2d6cb86e2d55b2469fd74e72d70ecf41e1ebd0b
Parents: 880b8d9d
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Mon Feb 24 13:55:41 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Mon Feb 24 13:55:41 2014 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/transport/servlet/AbstractHTTPServlet.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a2d6cb86/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractHTTPServlet.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractHTTPServlet.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractHTTPServlet.java
index fb0702f..353f693 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractHTTPServlet.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/AbstractHTTPServlet.java
@@ -345,7 +345,7 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
         ServletContext sc = super.getServletContext();
         RequestDispatcher rd = dispatcherServletName != null 
             ? sc.getNamedDispatcher(dispatcherServletName) 
-            : sc.getRequestDispatcher(theServletPath + pathInfo);
+            : sc.getRequestDispatcher((theServletPath + pathInfo).replace("//", "/"));
         if (rd == null) {
             String errorMessage = "No RequestDispatcher can be created for path " + pathInfo;
             if (dispatcherServletName != null) {
@@ -398,7 +398,7 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
             if ("/".equals(contextPath)) {
                 contextPath = "";
             }
-            return contextPath + servletPath + pathInfo;
+            return contextPath + (servletPath + pathInfo).replace("//", "/");
         }
         
         @Override


Mime
View raw message