You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2001/11/01 21:22:36 UTC
get_parent_resource() on unknown url
Okay, so I no longer get the 502 error since I strictly defined
apache's hostname in httpd.conf. Instead, it's back to the same old
error whenever I send a COPY request:
[Thu Nov 01 14:41:13 2001] [error] [client 192.168.0.6] get_parent_resource was called for /testing/sussman/$svn/wrk/a0ae1e99-d11d-b211-97da-845f131397f6/fundir/foo2 (type 1) [500, #0]
It seems the mod_dav is calling the dav_svn_get_parent_resource() hook
on a non-existent URL. The URL doesn't exist because we're trying to
create it: it's the "Destination" header in the COPY request. By the
time the resource is passed to the hook, mod_dav (or someone else) has
already tagged resource as type 1 ("unknown"). So the hook chokes as
it's currently written.
I simply don't understand DAV well enough to find a solution. Should
the hook assume that any type-1 resources are due to copies or moves,
and explicitly handle them? Should it attempt to construct a parent
resource anyway (via dav_svn_create_private_resource)?
Or is this a bigger problem in mod_dav itself? Should mod_dav not be
labeling the resource as type-1?
Awaiting enlightenment from gstein.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: get_parent_resource() on unknown url
Posted by Greg Stein <gs...@lyra.org>.
On Thu, Nov 01, 2001 at 03:22:36PM -0600, Ben Collins-Sussman wrote:
>...
> It seems the mod_dav is calling the dav_svn_get_parent_resource() hook
> on a non-existent URL. The URL doesn't exist because we're trying to
> create it: it's the "Destination" header in the COPY request.
All righty...
> By the
> time the resource is passed to the hook, mod_dav (or someone else) has
> already tagged resource as type 1 ("unknown"). So the hook chokes as
> it's currently written.
0 is DAV_RESOURCE_TYPE_UNKNOWN. 1 is DAV_RESOURCE_TYPE_REGULAR. Generally,
we only see those for the "public" URLs.
[ these values come from mod_dav.h ]
> I simply don't understand DAV well enough to find a solution. Should
> the hook assume that any type-1 resources are due to copies or moves,
> and explicitly handle them? Should it attempt to construct a parent
> resource anyway (via dav_svn_create_private_resource)?
It should not be a type 1. Anything under the ../$svn/wrk/ area should be
DAV_RESOURCE_TYPE_WORKING, whether it exists or not.
> Or is this a bigger problem in mod_dav itself? Should mod_dav not be
> labeling the resource as type-1?
mod_dav_svn is the guy that labelled it incorrectly.
Hmm. I don't see anything obviously wrong in the parsing and setup. It all
happens in repos.c. dav_svn_parse_uri() does some initial parsing
(indirectly using the dav_svn_parse_working_uri function). After the parse
is done, then it calls the dav_svn_prep_working() function. Neither of those
can set the type to REGULAR.
That would tend to indicate something else is going on somewhere... Some
debugging is in order.
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