فهرست منبع

HDFS-1317. Remove the FILEPATH_PATTERN from hdfsproxy.AuthorizationFilter. Contributed by Rohini Palaniswamy

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/trunk@980528 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 15 سال پیش
والد
کامیت
cf6ba8ce78
2فایلهای تغییر یافته به همراه3 افزوده شده و 13 حذف شده
  1. 3 0
      CHANGES.txt
  2. 0 13
      src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java

+ 3 - 0
CHANGES.txt

@@ -171,6 +171,9 @@ Trunk (unreleased changes)
     HDFS-1319. Fix location of re-login for secondary namenode from HDFS-999. 
     (jghoman)
 
+    HDFS-1317. Remove the FILEPATH_PATTERN from hdfsproxy.AuthorizationFilter.
+    (Rohini Palaniswamy via szetszwo)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 0 - 13
src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/AuthorizationFilter.java

@@ -41,13 +41,6 @@ public class AuthorizationFilter implements Filter {
   /** Pattern for a filter to find out if a request is HFTP/HSFTP request */
   protected static final Pattern HFTP_PATTERN = Pattern
       .compile("^(/listPaths|/data|/streamFile|/file)$");
-  /**
-   * Pattern for a filter to find out if an HFTP/HSFTP request stores its file
-   * path in the extra path information associated with the URL; if not, the
-   * file path is stored in request parameter "filename"
-   */
-  protected static final Pattern FILEPATH_PATTERN = Pattern
-      .compile("^(/listPaths|/data|/file)$");
 
   protected String namenode;
   
@@ -119,14 +112,8 @@ public class AuthorizationFilter implements Filter {
     // check request path
     String servletPath = rqst.getServletPath();
     if (HFTP_PATTERN.matcher(servletPath).matches()) {
-      // request is an HSFTP request
-      if (FILEPATH_PATTERN.matcher(servletPath).matches()) {
         // file path as part of the URL
         filePath = rqst.getPathInfo() != null ? rqst.getPathInfo() : "/";
-      } else {
-        // file path is stored in "filename" parameter
-        filePath = rqst.getParameter("filename");
-      }
     }
     return filePath;
   }