cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Reverting the change
Date Fri, 05 Jun 2015 12:28:52 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 20467ecea -> f5655d81e


Reverting the change


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

Branch: refs/heads/master
Commit: f5655d81ea6a880cf6b8b1cdcabddf1cd4dbe869
Parents: 20467ec
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Jun 5 13:28:32 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Jun 5 13:28:32 2015 +0100

----------------------------------------------------------------------
 .../provider/RequestDispatcherProvider.java     | 21 ++---------------
 .../transport/servlet/AbstractHTTPServlet.java  | 24 ++++----------------
 2 files changed, 6 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f5655d81/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 f3ed18f..e24075f 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
@@ -92,7 +92,6 @@ public class RequestDispatcherProvider extends AbstractConfigurableProvider
     private String locationPrefix;
     private String resourceExtension;
     private boolean includeResource; 
-    private boolean ignoreContextPath;
     
     private MessageContext mc; 
 
@@ -195,7 +194,7 @@ public class RequestDispatcherProvider extends AbstractConfigurableProvider
             }
             
             HttpServletRequestFilter requestFilter = new HttpServletRequestFilter(
-                servletRequest, path, theServletPath, saveParametersAsAttributes, ignoreContextPath);
+                servletRequest, path, theServletPath, saveParametersAsAttributes);
             String attributeName = getBeanName(o);
             if (REQUEST_SCOPE.equals(scope)) {
                 requestFilter.setAttribute(attributeName, o);
@@ -412,41 +411,25 @@ public class RequestDispatcherProvider extends AbstractConfigurableProvider
         this.resourceExtension = resourceExtension;
     }
 
-    public void setIgnoreContextPath(boolean ignoreContextPath) {
-        this.ignoreContextPath = ignoreContextPath;
-    }
-
     protected static class HttpServletRequestFilter extends HttpServletRequestWrapper {
         
         private Map<String, String[]> params;
         private String path;
         private String servletPath;
         private boolean saveParamsAsAttributes;
-        private boolean ignoreContextPath;
         
         public HttpServletRequestFilter(HttpServletRequest request, 
                                         String path, 
                                         String servletPath,
-                                        boolean saveParamsAsAttributes,
-                                        boolean ignoreContextPath) {
+                                        boolean saveParamsAsAttributes) {
             super(request);
             this.path = path;
             this.servletPath = servletPath;
             this.saveParamsAsAttributes = saveParamsAsAttributes;
-            this.ignoreContextPath = ignoreContextPath;
             params = new HashMap<String, String[]>(request.getParameterMap());
         }
         
         @Override
-        public String getContextPath() {
-            if (ignoreContextPath) {
-                return "/";
-            } else {
-                return super.getContextPath();
-            }
-        }
-        
-        @Override
         public String getServletPath() {
             return servletPath;
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/f5655d81/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 1bd12f8..520b448 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
@@ -78,7 +78,6 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
     private static final String REDIRECT_SERVLET_PATH_PARAMETER = "redirect-servlet-path";
     private static final String REDIRECT_ATTRIBUTES_PARAMETER = "redirect-attributes";
     private static final String REDIRECT_QUERY_CHECK_PARAMETER = "redirect-query-check";
-    private static final String REDIRECT_IGNORE_CONTEXT_PARAMETER = "redirect-ignore-context";
     private static final String REDIRECT_WITH_INCLUDE_PARAMETER = "redirect-with-include";
     private static final String USE_X_FORWARDED_HEADERS_PARAMETER = "use-x-forwarded-headers";
     private static final String X_FORWARDED_PROTO_HEADER = "X-Forwarded-Proto";
@@ -105,9 +104,8 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
     private Map<String, String> staticContentTypes = 
         new HashMap<String, String>(DEFAULT_STATIC_CONTENT_TYPES);
     private boolean redirectQueryCheck;
-    private boolean redirectIgnoreContextPath;
-    private boolean useXForwardedHeaders;
-        
+    private boolean useXForwardedHeaders; 
+    
     public void init(ServletConfig servletConfig) throws ServletException {
         super.init(servletConfig);
 
@@ -115,7 +113,6 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
         staticWelcomeFile = servletConfig.getInitParameter(STATIC_WELCOME_FILE_PARAMETER);
         redirectList = parseListSequence(servletConfig.getInitParameter(REDIRECTS_PARAMETER));
         redirectQueryCheck = Boolean.valueOf(servletConfig.getInitParameter(REDIRECT_QUERY_CHECK_PARAMETER));
-        redirectIgnoreContextPath = Boolean.valueOf(servletConfig.getInitParameter(REDIRECT_IGNORE_CONTEXT_PARAMETER));
         dispatcherServletName = servletConfig.getInitParameter(REDIRECT_SERVLET_NAME_PARAMETER);
         dispatcherServletPath = servletConfig.getInitParameter(REDIRECT_SERVLET_PATH_PARAMETER);
         redirectAttributes = parseMapSequence(servletConfig.getInitParameter(REDIRECT_ATTRIBUTES_PARAMETER));
@@ -385,8 +382,7 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
                 request.setAttribute(entry.getKey(), entry.getValue());
             }
             HttpServletRequest servletRequest = 
-                new HttpServletRequestRedirectFilter(request, pathInfo, theServletPath, customServletPath,

-                                                     redirectIgnoreContextPath);
+                new HttpServletRequestRedirectFilter(request, pathInfo, theServletPath, customServletPath);
             if (PropertyUtils.isTrue(getServletConfig().getInitParameter(REDIRECT_WITH_INCLUDE_PARAMETER)))
{
                 rd.include(servletRequest, response);
             } else {
@@ -405,17 +401,14 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
         
         private String pathInfo;
         private String servletPath;
-        private boolean ignoreContextPath;
         
         public HttpServletRequestRedirectFilter(HttpServletRequest request, 
                                         String pathInfo,
                                         String servletPath,
-                                        boolean customServletPath,
-                                        boolean ignoreContextPath) {
+                                        boolean customServletPath) {
             super(request);
             this.pathInfo = pathInfo;
             this.servletPath = servletPath;
-            this.ignoreContextPath = ignoreContextPath;
             if ("/".equals(this.servletPath) && !customServletPath) {
                 if (this.pathInfo == null) {
                     this.pathInfo = "/";
@@ -427,15 +420,6 @@ public abstract class AbstractHTTPServlet extends HttpServlet implements
Filter
         }
         
         @Override
-        public String getContextPath() {
-            if (ignoreContextPath) {
-                return "/";
-            } else {
-                return super.getContextPath();
-            }
-        }
-        
-        @Override
         public String getServletPath() {
             return servletPath;
         }


Mime
View raw message