Kannan wrote:
> Julian Foad wrote:
> > do_checkout():
> >   ...
> >   *locn = svn_ra_neon__request_get_location(request, pool);
> > 
> > checkout_resource():
> >   do_checkout(cc, rsrc->vsn_url, allow_404, token, &code, &locn, pool);
> >   ne_uri_parse(locn, &parse);
> >   rsrc->wr_url = svn_uri_canonicalize(parse.path, rsrc->pool);
> > 
> > Does the "ne_uri_parse" function create a non-canonical ".path", or does
> > the do_checkout() function create a non-canonical URL?
> 
> `do_checkout()' creates the non-canonical URL, after which the scheme,
> host, port and path of the URL are stored as separate members in 'parse'
> using `ne_uri_parse()'.

OK. The policy in Subversion is that the paths and URLs passed in and
out of all APIs are canonical unless otherwise stated. Therefore we
should make do_checkout() set its "locn" output parameter to a canonical
URL.

> > If the former, we should look for all other uses of ne_uri_parse() and
> > canonicalize after them as well. If the latter, we should fix the
> > do_checkout() function and look for all other uses of
> > svn_ra_neon__request_get_location().

Oops - when I wrote that, I was thinking
svn_ra_neon__request_get_location() was an external (non-Subversion)
function, but it is a Subversion function so it should return a
canonical URL.

> Does this imply to make `svn_ra_neon__request_get_location()' create a
> non-canonical URL by default?

No, it should create a canonical URL. The fix we need is inside
svn_ra_neon__request_get_location(), or at least we need to look inside
that function to see where the non-canonical URL is coming from, and
maybe trace further back to find the cause of the problem.

> > (What does the non-canonical URL or URI look like?)
> 
> http://localhost/repos/devrepo/!svn/wrk/b4ec0dff-9abf-42ee-8860-a6a9630218e4/
> 
> (which is generated by do_checkout() and parse.path value would be:
> 
> /repos/devrepo/!svn/wrk/b4ec0dff-9abf-42ee-8860-a6a9630218e4/ )

Thanks.

- Julian


Reply via email to