You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexy Khrabrov <al...@setup.org> on 2002/07/31 00:59:47 UTC

Re: still no luck with http://svn.host.tld/ (solved!)

Works as a charm.  Thanks, Greg, you're da[v] man!  :-)

Cheers,
Alexy

> 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

Re: still no luck with http://svn.host.tld/ (solved!)

Posted by Branko Čibej <br...@xbc.nu>.
Alexy Khrabrov wrote:

>Works as a charm.  Thanks, Greg, you're da[v] man!  :-)
>

Uh, I suspect you patched mod_dav_svn to make it work. Could you post 
that patch? (But read the HACKING file first, the section on submitting 
patches and writing log messages).

Thanks!


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org