You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Williams, James P2 (N-USA)" <ja...@lmco.com> on 2010/06/23 21:58:20 UTC

RedirectMatch Question

I don't know the details but have seen Apache config files that included something like these lines.

   # workaround for authz and SVNListParentPath issue
   RedirectMatch ^(/svn)$ $1/

Here's an example.

   http://directory.fedoraproject.org/wiki/Howto:Subversion_Apache_LDAP

I think this just ensures URLs end in a trailing slash.  Does whatever "issue" this was trying to fix still exist?  How can I tell if I need to do this in my Apache config?

Thanks,

Jim

Re: RedirectMatch Question

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Jim wrote on Fri, 25 Jun 2010 at 21:01 -0000:
> It looks like this issue is already being worked if not fixed by now.
> 
>    http://subversion.tigris.org/issues/show_bug.cgi?id=2753
> 

The issue indicates this was fixed in trunk (1.7.0).  I don't recall 
whether it's been backported to 1.6.x yet; you can check the CHANGES file 
(or 'svn mergeinfo .../branches/1.6.x') to see.

> Thanks,
> 
> Jim
> 
> 

Re: RedirectMatch Question

Posted by Jim <el...@gmail.com>.
It looks like this issue is already being worked if not fixed by now.

   http://subversion.tigris.org/issues/show_bug.cgi?id=2753

Thanks,

Jim

Re: RedirectMatch Question

Posted by Jim <el...@gmail.com>.
On Jun 23, 4:58 pm, "Williams, James P2 (N-USA)"
<ja...@lmco.com> wrote:
> I don't know the details but have seen Apache config files that
> included something like these lines.
>
>    # workaround for authz and SVNListParentPath issue
>    RedirectMatch ^(/svn)$ $1/
>
> Here's an example.
>
>    http://directory.fedoraproject.org/wiki/Howto:Subversion_Apache_LDAP
>
> I think this just ensures URLs end in a trailing slash.  Does
> whatever "issue" this was trying to fix still exist?  How can I
> tell if I need to do this in my Apache config?

I'm still looking for an answer to this, but found a little more here,

   http://blogs.open.collab.net/svn/subversion_server/

Here's the relevant quote.

"SVNListParentPath and Subversion's authz
One of the first problems people run into when building an Apache-
based Subversion server is when they want to have mod_dav_svn serve a
list of repositories. Everything works fine until they enable
Subversion's authorization (authz) support. What happens is the server
will be configured properly and secured properly but when you go to
the repository collection list, which in our case is http://localhost/repos,
you are forbidden to view the collection even if you have access.
Well, with the RedirectMatch closer to the top of the configuration,
you fix this issue. How you might be asking and the reason is that
when you enable authz, you must have a trailing slash at the end of
the collection url. With the RedirectMatch, we automatically redirect
urls to the collection listing when there is no trailing slash.
Problem solved."

I'm still not sure if I need it because browsing the parent path seems
to work fine whether I've got the RedirectMatch or not.  So, was the
bug fixed?

I've got more than 60 <Location> blocks in my http.conf to give URLs
to as many SVNParentPaths.  I'm trying to eliminate as much variation
among these copies as I can to ease maintenance of this mess (also
using Include, and wishing I had mod_macro).  If I could get rid of
the RedirectMatch, that'd be one less line in each copy.

Thanks,

Jim