subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Quinot <qui...@adacore.com>
Subject Re: [PATCH] Virtual host mode with user name in URL
Date Thu, 15 Feb 2018 15:54:18 GMT
* Philip Martin, 2018-02-15 :

> That looks correct so far, but it leads me to consider port numbers.
> 
>   svn ls svn://hostname:3691/repo
> 
> Should the server look for the repository under 'hostname:3691' or under
> the plain 'hostname'?  I suspect the port number should be ignored and
> that the plain 'hostname' is correct and that makes the current
> behaviour another bug.  We might be better off using apr_uri_parse()
> rather than writing our own parsing code here.

Thanks for your feedback Philip!

I also thought about port numbers, and I think that's a different
situations. I would view URLs differring only in the user name:
  svn://svn.example.com/
  svn://foo@svn.example.com/
  svn://bar@svn.example.com/
as "clearly" referring to the same server/repo in all three cases.

On the other hand, I can see legitimate use cases where:
  svn://svn.example.com/
  svn://svn.example.com:3691/
would refer to *different* servers/repos, in which case it makes sense
to *include* the port number in the path when operating in virtual host
mode.

Conversely, in use cases where the intent actually is for both
URLs to denote the same underlying server, one can use a
symbolic link svn.example.com:3691 -> svn.example.com.

Unlike the set of user names, I would expect the set of ports
for which an svnserve process is listening to be "small" and "static"
enough that this is a viable approach.

Good remark about apr_uri_parse. Not clear it will substantially
simplify the code (will require introducing an apr_sprintf call,
and potentially conditional code depending on if and when a port
number needs to be explicitly included), but certainly cleaner from
a conceptual standpoint.

-- 
Thomas Quinot, Ph.D. ** quinot@adacore.com ** IT Lead Engineer
               AdaCore -- Paris, France -- New York, USA

Mime
View raw message