Michael G Schwern <schw...@pobox.com> writes:

> On 2012.7.24 9:53 PM, Jonathan Nieder wrote:
>> Michael G Schwern wrote:
>> 
>>> No, now it's just canonicalizing as early as possible.  Preferably within 
>>> the
>>> object accessor rather than at the point of use.  So in the code below,
>>> $full_url is already escaped/canonicalized.
>> 
>> Let's start with this.
>> 
>> Is svn_path_canonicalize() idempotent?  What does it do when it
>> encounters a percent-sign?
>
> Nothing, because paths are not URI escaped. :)
>
> You probably meant svn_uri_canonicalize().  And no, it does not double escape,
> so its safe to escape as early as possible.

Are you saying that the function assumes that a local pathname would
not have '%' in it, returns its input as-is when it sees one, and if
the caller really needs to express a path with '%' in it, it is the
responsibility of the caller to escape it?

That makes it even more confusing....

>    my $uri = "http://www.example.com/ foo";
>
>     print SVN::_Core::svn_uri_canonicalize(
>         SVN::_Core::svn_uri_canonicalize($uri)
>     );
>
> That produces "http://www.example.com/%20foo";.

In other words, if your DocumentRoot was /var/www and you have a
directory /var/www/per%cent you want to expose to the outside world,
you have to say "http://www.example.com/per%25cent"; yourself and the
"canonicalize" function will be an identity function?

I have this vague suspicion that Jonathan was asking about what your
Git::SVN::Utils::canonicalize_path() sub does, so all of the above
might be moot, though...
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to