You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by je...@apache.org on 2003/01/30 04:39:15 UTC

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestURI.java

jericho     2003/01/29 19:39:15

  Modified:    httpclient/src/test/org/apache/commons/httpclient
                        TestURI.java
  Log:
  - Add relative URI examples...
  
  Added by "Armando Anton" <ar...@newknow.com>
  
  Revision  Changes    Path
  1.2       +23 -4     jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java
  
  Index: TestURI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestURI.java	28 Jan 2003 05:17:22 -0000	1.1
  +++ TestURI.java	30 Jan 2003 03:39:15 -0000	1.2
  @@ -129,8 +129,27 @@
               { "../..", "http", "a", "/", null, null, "http://a/" },
               { "../../", "http", "a", "/", null, null, "http://a/" },
               { "../../g", "http", "a", "/g", null, null, "http://a/g" },
  +            // Abnormal examples
  +            // exception thrown the right below two
  +            // { "../../../g", "http", "a", being-normalized path?, null, null, "http://a/../g?" },
  +            // { "../../../../g", "http", "a", being-normalied path?, null, null, "http://a/../../g?" },
  +            { "/./g", "http", "a", "/./g", null, null, "http://a/./g" },
  +            { "/../g", "http", "a", "/../g", null, null, "http://a/../g" },
  +            { "g.", "http", "a", "/b/c/g.", null, null, "http://a/b/c/g." },
  +            { ".g", "http", "a", "/b/c/.g", null, null, "http://a/b/c/.g" },
  +            { "g..", "http", "a", "/b/c/g..", null, null, "http://a/b/c/g.." },
  +            { "..g", "http", "a", "/b/c/..g", null, null, "http://a/b/c/..g" },
  +            { "./../g", "http", "a", "/b/g", null, null, "http://a/b/g" },
  +            { "./g/.", "http", "a", "/b/c/g/", null, null, "http://a/b/c/g/" },
  +            { "g/./h", "http", "a", "/b/c/g/h", null, null, "http://a/b/c/g/h" },
  +            { "g/../h", "http", "a", "/b/c/h", null, null, "http://a/b/c/h" },
  +            { "g;x=1/./y", "http", "a", "/b/c/g;x=1/y", null, null, "http://a/b/c/g;x=1/y" },
  +            { "g;x=1/../y", "http", "a", "/b/c/y", null, null, "http://a/b/c/y" },
  +            { "g?y/./x", "http", "a", "/b/c/g", "y/./x", null, "http://a/b/c/g?y/./x" },
  +            { "g?y/../x", "http", "a", "/b/c/g", "y/../x", null, "http://a/b/c/g?y/../x" },
  +            { "g#s/./x", "http", "a", "/b/c/g", null, "s/./x", "http://a/b/c/g#s/./x" },
  +            { "g#s/../x", "http", "a", "/b/c/g", null, "s/../x", "http://a/b/c/g#s/../x" }
           };
  -        
           for (int i = 0; i < testRelativeURIs.length; i++) {
               
               URI testURI = null;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org