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

Re: still no luck with http://svn.host.tld/

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-07-31 02:43:12 CEST

On Tue, Jul 30, 2002 at 10:16:18PM +0100, Dave Cridland wrote:
> On Tue, 2002-07-30 at 13:53, Alexy Khrabrov wrote:
> >
> > I'm still trying to host my SVN repository at www.suffix.com,
> > and looks like DAV doesn't work in <Location />. Here's what
> > I get in the access_log:
> >
> > 128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET / HTTP/1.1" 301 308
> > 128.6.178.78 - - [30/Jul/2002:08:46:08 -0400] "GET // HTTP/1.1" 403 280
> >
> > That is, for some reason it gets redirected to //, which can't exist!

This is a bug in mod_dav_svn. The logic in dav_svn_get_resource() for
computing "had_slash" is incorrect. Specifically, it ties it in along with
the removal of a trailing slash. Well, the URI *does* have a trailing slash,
but it isn't removed since it is the root. Thus, the code *thinks* there was
no trailing slash, so it issues the 301 redirection.

I don't have an actual patch, but can you change the code around line 870 to
read:

  len1 = strlen(uri);
  had_slash = uri[len1 - 1] == '/';
  if (len1 > 1 && had_slash)
    uri[len1 - 1] = '\0';

Just replace the whole section (down thru the else clause) with the above
code.

[ sorry, but I just can't get it tested myself; I've got some other stuff
  that needs to be done ]

>...
> Confirmed here too, although I tried with <Directory> rather than
> <Location>.

Directory is *never* going to work. You must always use Location to
configure an SVN repository. This is because the repository is not located
in the filesystem (according to Apache's concept of that). Instead, you set
up a logical location and then use SVNPath to state where the physical
repository resides.

> I'll build the latest revision and see what happens then. I might take
> this one to task and see if I can find the problem, but it's probably
> way beyond me. I have to admit I'd *like* this one to work.

See the code above. I suspect that will work.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 31 02:40:37 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.