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

[PATCH] Virtual host mode with user name in URL

From: Thomas Quinot <quinot_at_adacore.com>
Date: Wed, 14 Feb 2018 10:46:57 +0100

Bug reproduced on Debian GNU/Linux 9 with trunk version as of
revision 1824204, building with default options.

When operating svnserve in virtual host mode (--virtual-host),
any attempt to access a repository through a URL that includes
a user name will fail:

$ mkdir -p /tmp/repos/localhost
$ svnadmin create /tmp/repos/localhost/Dev
$ svnserve -r /tmp/repos -d --virtual-host
$ svn ls svn://localhost/Dev
<works, returning empty result>
$ svn ls svn://foo@localhost/Dev
svn: E170013: Unable to connect to a repository at URL 'svn://foo@localhost/Dev'
svn: E210005: No repository found in 'svn://foo@localhost/Dev'

The reason for this is that svnserve will in this case include
the user name in the repository path, which can be shown
as follows:

$ ln -s localhost /tmp/repos/foo_at_localhost
$ svn ls svn://foo@localhost/Dev
<now works>
$ svn ls svn://bar@localhost/Dev
svn: E170013: Unable to connect to a repository at URL 'svn://bar@localhost/Dev'
svn: E210005: No repository found in 'svn://bar@localhost/Dev'

A simple fix is attached.

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

Received on 2018-02-14 11:03:49 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.