Checkout
stsp
committed
on 13 Jun 08
Canonicalise URIs which have an empty hostname part correctly.

This fixes the crash described in #2116 ('svn log file:///'
results in a fai… Show more
Canonicalise URIs which have an empty hostname part correctly.

This fixes the crash described in #2116 ('svn log file:///'

results in a failed assertion).

* subversion/libsvn_subr/path.c

 (svn_path_canonicalize): We used to strip the trailing slash

  of URIs with no hostname, e.g. http:// got canonicalised to http:/

  Don't do that!

* subversion/tests/libsvn_subr/path-test.c

 (test_canonicalize): Add some test cases for the above.

* subversion/libsvn_ra_local/split_url.c

 (svn_ra_local__split_URL): Treat file:// equivalent to file:///.

  This function used to complain about a missing hostname when

  just passed "file://". But "file://" is the canonical version

  of "file:///", which is equivalent to "file://localhost/".

  skip_uri_scheme() (in subversion/libsvn_subr/path.c) and

  therefore svn_path_is_url() have been considering "file://"

  a valid URL since r14445.

Review by: danielsh

Show less