This is an automated email from the ASF dual-hosted git repository.

aajisaka pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 9ed2c22  HDFS-14466. Add a regression test for HDFS-14323.
9ed2c22 is described below

commit 9ed2c22d579a032db3c31bd7b6bb676b30c09af5
Author: Masatake Iwasaki <[email protected]>
AuthorDate: Thu Jul 11 17:40:25 2019 +0900

    HDFS-14466. Add a regression test for HDFS-14323.
    
    Signed-off-by: Akira Ajisaka <[email protected]>
    (cherry picked from commit 00dd843a1a6c9d8b616631cdcf24c00e82498dab)
---
 .../java/org/apache/hadoop/hdfs/web/TestWebHdfsUrl.java    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsUrl.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsUrl.java
index 02a68ea..6733555 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsUrl.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsUrl.java
@@ -469,4 +469,18 @@ public class TestWebHdfsUrl {
     }
   }
 
+  @Test
+  public void testWebHdfsUrlEncoding() throws Exception {
+    final WebHdfsFileSystem fs =
+        (WebHdfsFileSystem) FileSystem.get(uri, WebHdfsTestUtil.createConf());
+
+    // characters which should not be urlencoded.
+    final String unreserved = "_-!.~'()*";
+    final String punct = ",:$&=";
+    String path = "/testWebHdfsUrlEncoding" + unreserved + punct;
+    URL url =
+        WebHdfsTestUtil.toUrl(fs, GetOpParam.Op.LISTSTATUS, new Path(path));
+    WebHdfsTestUtil.LOG.info(url.getPath());
+    assertEquals(WebHdfsFileSystem.PATH_PREFIX + path, url.getPath());
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to