I had a brief conversation with some people on IRC tonight because my svn
import was failing.  The error was:

subversion/libsvn_ra_dav/util.c:358: (apr_err=175002)
svn: RA layer request failed
svn: OPTIONS request failed on /foobar
subversion/libsvn_ra_dav/util.c:343: (apr_err=175002)
svn: The OPTIONS request returned invalid XML in the response: XML parse
error at line 1: Extra content at the end of the document
.. (/foobar)


Notice that a 301 request is a permanent redirect, and the reason for this
redirect is that I requested /foobar, not /foobar/.  There are a couple of
problems with this.

1)  The error message isn't very good.

2)  I got this even if I put /foobar/ in my request.  I haven't done
enough research to determine if my shell or the svn client was stripping
off the trailing slash, but something is.  I tend to think it is the
shell.

3)  This is a DAV resource and an OPTIONS request, thus it shouldn't be
subject to mod_dir's redirection.

The solution, luckily, is simple.  Add the following to your Apache config
file:

            BrowserMatch "SVN" redirect-carefully

This instructs mod_dir to only do the redirect on GET requests.  That
should be mentioned in the docs somewhere.

I have copied the httpd development mailing list, because this bug was
specifically addressed over a year ago.  I know, because I am the person
who brought it to Greg's attention last time too.  Mod_dir should not be
redirecting non-GET requests by default.

Ryan

Reply via email to