cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/2] git commit: [CXF-5575] Updating RequestDispatcher to set the servlet path to the empty value when possible
Date Thu, 27 Feb 2014 13:17:29 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3889d046a -> 252b29404


[CXF-5575] Updating RequestDispatcher to set the servlet path to the empty value when possible


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

Branch: refs/heads/master
Commit: a77d464bb106ec0bef076cf2a2ad62fb921fdad9
Parents: 30fb5ca
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Feb 27 13:16:29 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Feb 27 13:16:29 2014 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a77d464b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
index 72f9bcf..c608673 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
@@ -179,6 +179,9 @@ public class RequestDispatcherProvider extends AbstractConfigurableProvider
             mc.put(AbstractHTTPDestination.REQUEST_REDIRECTED, Boolean.TRUE);
             
             String theServletPath = servletPath == null ? "/" : servletPath;
+            if ("/".equals(theServletPath) && path != null && path.startsWith("/"))
{
+                theServletPath = "";
+            }
             HttpServletRequestFilter servletRequest = 
                 new HttpServletRequestFilter(mc.getHttpServletRequest(), path, 
                                              theServletPath, saveParametersAsAttributes);


Mime
View raw message