subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1138422 - in /subversion/trunk/subversion: include/svn_dirent_uri.h tests/libsvn_subr/dirent_uri-test.c
Date Wed, 22 Jun 2011 12:10:15 GMT
Author: julianfoad
Date: Wed Jun 22 12:10:15 2011
New Revision: 1138422

URL: http://svn.apache.org/viewvc?rev=1138422&view=rev
Log:
Add documentation and more tests for the URI port-number canonicalization that
was added in r1137927.

* subversion/include/svn_dirent_uri.h
  (svn_uri_canonicalize): Mention port-number canonicalization.

* subversion/tests/libsvn_subr/dirent_uri-test.c
  (uri_canonical_tests): Add more test cases.

Modified:
    subversion/trunk/subversion/include/svn_dirent_uri.h
    subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c

Modified: subversion/trunk/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_dirent_uri.h?rev=1138422&r1=1138421&r2=1138422&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_dirent_uri.h (original)
+++ subversion/trunk/subversion/include/svn_dirent_uri.h Wed Jun 22 12:10:15 2011
@@ -469,6 +469,8 @@ svn_relpath_canonicalize(const char *rel
  *   - normalizing the escaping of the path component by unescaping
  *     characters that don't need escaping and escaping characters that do
  *     need escaping but weren't
+ *   - removing the port number if it is the default port number (80 for
+ *     http, 443 for https, 3690 for svn)
  *
  * and possibly other semantically inoperative transformations.
  *

Modified: subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1138422&r1=1138421&r2=1138422&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Jun 22 12:10:15 2011
@@ -861,14 +861,27 @@ static const testcase_canonicalize_t uri
     { "file:///%DE%AD%BE%EF",  "file:///%DE%AD%BE%EF" },
     { "file:///%de%ad%be%ef",  "file:///%DE%AD%BE%EF" },
     { "file:///%DE%ad%BE%ef",  "file:///%DE%AD%BE%EF" },
+    /* With default port number; these are non-canonical */
+    { "http://server:",        "http://server" },
+    { "http://server:/",       "http://server" },
     { "http://server:80",      "http://server" },
-    { "http://server:81/",     "http://server:81" },
+    { "http://SERVER:80",      "http://server" },
+    { "http://server:80/",     "http://server" },
+    { "http://server:80/p",    "http://server/p" },
+    { "https://server:",       "https://server" },
     { "https://Server:443/q",  "https://server/q" },
+    { "svn://server:3690/",    "svn://server" },
     { "svn://sERVER:3690/r",   "svn://server/r" },
     { "svn://server:/r",       "svn://server/r" },
+    /* With non-default port number; both canonical and non-c. examples */
+    { "http://server:1",       "http://server:1" },
     { "http://server:443",     "http://server:443" },
-    { "svn://server:80",       "svn://server:80" },
+    { "http://server:81/",     "http://server:81" },
+    { "http://SERVER:3690/",   "http://server:3690" },
     { "https://server:3690",   "https://server:3690" },
+    { "https://SERVER:80/",    "https://server:80" },
+    { "svn://server:80",       "svn://server:80" },
+    { "svn://SERVER:443/",     "svn://server:443" },
 #ifdef SVN_USE_DOS_PATHS
     { "file:///c:/temp/repos", "file:///C:/temp/repos" },
     { "file:///c:/temp/REPOS", "file:///C:/temp/REPOS" },



Mime
View raw message