[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: New canonicalization functions [was: Subversion Exception!]

From: Branko Čibej <brane_at_apache.org>
Date: Fri, 14 Dec 2018 19:05:13 +0100

On Fri, 14 Dec 2018, 18:14 Julian Foad <julianfoad_at_apache.org wrote:

> Julian Foad wrote:
> > Are you willing to add random-input testing for them?
>
> The attached patch 'dirent-uri-test-random-2.patch' tests rules like:
>
> * every result should pass an X_is_canonical() test (obvious by code
> inspection);
> * every other input should produce SVN_ERR_CANONICALIZATION_FAILED;
> * when a path is "canonical", it should be unchanged by "canonicalize".
>
> Some findings:
>
> * svn_uri_canonicalize_safe("") aborts;
> * svn_uri_canonicalize_safe("/foo") aborts;
>

We can fix this in the private "canonicalize()" function that all these
eventually call. As before, I didn't have time to unknit the internal
implementation.

  * upper/lower case inconsistencies in URIs
>

What inconsistencies? A canonical URI has the scheme and host name in
lowercase, but the path, query, fragment and user info parts are
case-sensitive.

> I previously also found upper/lower case inconsistencies in dirent drive
> letters, when running these tests with "#define SVN_USE_DOS_PATHS" set in
> dirent_uri.c, but am right now failing to replicate that.
>

Similarly, I think we (or APR?) make drive letters lowercase.

-- Brane
Received on 2018-12-14 19:05:33 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.