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

Re: Problem using mod_dav_svn (returns 500 on non-svn requests)

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 18 Oct 2011 19:10:12 +0100

[Adding dev_at_s.a.o as I think this is a bug in the Subversion code,
 although I don't know enough to be sure.]

Jean-Daniel Dupas <devlists_at_shadowlab.org> writes:

>> Le 18 oct. 2011 à 18:39, Jean-Daniel Dupas a écrit:
>>
>>> After upgrading to svn 1.7, I encounter some very annoying issues.
>>> I have a web server with the following configuration:
>>>
>>> hostname/ : standard website
>>> hostname/svn: subversion repositories (using dav_svn)
>>> hostname/projects: other website.
>>>
>>> Before the update, this configuration were working fine. But after
>>> the update, anytime the server receives a POST request (whatever the
>>> path is), the dav_svn module try to handle it, and when it failed
>>> (always when the path does not start with /svn/...), it returns a
>>> 500 error (without logging anything in the error.log, which is an
>>> other issue).
>>>
>>> FWIW, the error is created and returned by the get_resource()
>>> function, in mod_dav_svn/repos.c.
>>>
>>> Is there something I can do to workaround this issue ?
>
> I found some details about this issue.
>
> When neither SVNPath, nor SVNParentPath are defined in a vhost, or
> alias, the mod_dav_svn prevents processing of all POST requests.
>
> So it is no longer possible to have mod_dav_svn loaded in an apache
> instance used to serve other content (as modules are globals).

As far as I can see mod_dav_svn.c:dav_svn__handler passes all POST
requests to dav_svn__method_post and that function will return an error
if the request does not have SVNPath or SVNParentPath set since it will
fail to open a repository.

Is that the behaviour we want? I don't think we should be attempting to
handle POST requests that are directed at non-Subversion locations.
Should one of those functions simply ignore the POST request when
neither SVNPath nor SVNParentPath is set?

I see we register the hook using APR_HOOK_LAST. Does that mean we
expect other hooks to get in first and handle non-Subversion POST
requests? What happpens if the other handler also uses APR_HOOK_LAST?
Does it then depend on the order of the module loads? Is it random?

-- 
Philip
Received on 2011-10-18 20:11:03 CEST

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.