You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2002/09/18 16:49:26 UTC
[PATCH] Fix problem commiting to "/" Location
Philip Martin <ph...@codematters.co.uk> writes:
> Philip Martin <ph...@codematters.co.uk> writes:
>
> > I get the same error over http when I try to commit to a "/" Location.
> > Looks like we may have a bug, I seem to remember that "/" didn't work
> > at all in the past, and that some recent changes made (some of) it
> > work.
This "works for me", but I don't pretend to understand all this
DAV/URL stuff.
* subversion/mod_dav_svn/util.c (dav_svn_simple_parse_uri): Handle
root that is "/"
Index: subversion/mod_dav_svn/util.c
===================================================================
--- subversion/mod_dav_svn/util.c
+++ subversion/mod_dav_svn/util.c Wed Sep 18 17:39:44 2002
@@ -184,6 +184,8 @@
*/
len1 = strlen(path);
len2 = strlen(relative->info->repos->root_path);
+ if (len2 == 1 && relative->info->repos->root_path[0] == '/')
+ len2 = 0;
if (len1 < len2
|| (len1 > len2 && path[len2] != '/')
|| memcmp(path, relative->info->repos->root_path, len2) != 0)
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: [PATCH] Fix problem commiting to "/" Location
Posted by Sander Striker <st...@apache.org>.
> From: Philip Martin
> Sent: 18 September 2002 18:49
> Philip Martin <ph...@codematters.co.uk> writes:
> > Philip Martin <ph...@codematters.co.uk> writes:
> >
> > > I get the same error over http when I try to commit to a "/" Location.
> > > Looks like we may have a bug, I seem to remember that "/" didn't work
> > > at all in the past, and that some recent changes made (some of) it
> > > work.
>
> This "works for me", but I don't pretend to understand all this
> DAV/URL stuff.
Looks good to me, so I went ahead and committed it.
Sander
> * subversion/mod_dav_svn/util.c (dav_svn_simple_parse_uri): Handle
> root that is "/"
>
> Index: subversion/mod_dav_svn/util.c
> ===================================================================
> --- subversion/mod_dav_svn/util.c
> +++ subversion/mod_dav_svn/util.c Wed Sep 18 17:39:44 2002
> @@ -184,6 +184,8 @@
> */
> len1 = strlen(path);
> len2 = strlen(relative->info->repos->root_path);
> + if (len2 == 1 && relative->info->repos->root_path[0] == '/')
> + len2 = 0;
> if (len1 < len2
> || (len1 > len2 && path[len2] != '/')
> || memcmp(path, relative->info->repos->root_path, len2) != 0)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org