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:58:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.6.x-fixes 4a7e6b8fb -> f98ed2c8d


[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/f98ed2c8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f98ed2c8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f98ed2c8

Branch: refs/heads/2.6.x-fixes
Commit: f98ed2c8d90e820d4733e90e04ae8098ea7d1dd5
Parents: 4a7e6b8
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:57:49 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/f98ed2c8/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 b09bcc4..90a0bd3 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
@@ -325,7 +325,7 @@ public abstract class AbstractHTTPServlet extends HttpServlet {
         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) {
@@ -377,7 +377,7 @@ public abstract class AbstractHTTPServlet extends HttpServlet {
             if ("/".equals(contextPath)) {
                 contextPath = "";
             }
-            return contextPath + servletPath + pathInfo;
+            return contextPath + (servletPath + pathInfo).replace("//", "/");
         }
         
         @Override


Mime
View raw message