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

[PATCH] svn ls http://svn.host.tld/

From: Alexy Khrabrov <alexy.khrabrov_at_setup.org>
Date: 2002-08-01 05:51:30 CEST

* subversion/mod_dav_svn/util.c
  (dav_svn_build_uri) cannot have the resulting path starting with //,
  thus should not insert root_path in "...%s/..." when it is only /.

Problem description:
When hosting SVN at the root of a (virtual) host with URI like
http://svn.host.tld/, mod_dav_svn.so fed the command client wrong
properties, starting with //.  This was handled by a browser, but not
by the command-line svn, so svn ls http://svn.host.tld/ was returning
with Forbidden 403, as it tried to read //!svn/vcc/default, etc.
The solution is to check in mod_dav_svn/util.c whether the root_path is /,
and in that case not to insert it into the result.  The patch follows.
Index: subversion/mod_dav_svn/util.c
--- subversion/mod_dav_svn/util.c
+++ subversion/mod_dav_svn/util.c	Wed Jul 31 23:30:56 2002
@@ -108,6 +108,8 @@
   const char *href1 = add_href ? "<D:href>" : "";
   const char *href2 = add_href ? "</D:href>" : "";
+  if (strcmp(root_path, "/") == 0) root_path = "";
   switch (what)
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 1 05:53:52 2002

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.