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