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:57:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes da0ad35bb -> 1637e849b


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

Branch: refs/heads/2.7.x-fixes
Commit: 1637e849b15ef9f211ffd9d3ffb6facd8d39b226
Parents: da0ad35
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:56:42 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/1637e849/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