apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim Peterson <k.peter...@f5.com>
Subject RE: [dav-dev] FW: Case-insensitive file system moves
Date Wed, 30 May 2001 20:54:37 GMT
Jeff passed this e-mail thread to me, since I'm the one who needs to rename directories on

Currently, mod_dav.c has the responsibility for detecting the forbidden operation of renaming
or copying an object onto itself.  I think a case can be made for pushing that detection into
the repository layer, at least in the rename case.

In this case its clear that changing the case of a file on NT depends upon whether the underlying
file system supports it or not. In this particular case, the mod_dav.c needs to avoid deleting
the new resource in the case that they are the same, but it should leave to the repository
the question about whether it is a sensible operation. In the case of a versioned file system,
different versions of a file with the same content might be considered identical for some
operations and yet different for other operations. I can't come up with a definite example,
but something worth thinking about is a branch that inherits a version from a different branch.
In some cases, changes to one need to be propagated to another, and in that case they should
be the same. And yet in other cases they need to be different. It seems to me that the best
policy is just to minimize checks for identity at the mod_dav level.

What I'd like to do is submit a patch for moving the error for identical rename to the dav_fs_repos.c
module, even though that would require other repository implementations to put a check for
identity in their code.  Comments?


-----Original Message-----
From: Jeff Costlow 
Sent: Friday, May 25, 2001 1:32 PM
To: 'Greg Stein'; dav-dev@lyra.org
Cc: dev@apr.apache.org; Kim Peterson
Subject: RE: [dav-dev] FW: Case-insensitive file system moves

We've been looking into it a little bit, I think you are right that it needs to be done before
getting into dav_fs_repos.c, but if the move is complicated, it might be good to use functions
from that module.

I'll let you know what we discover, I'm not sure I was aware that different NT filesystems
would behave differently under the "ren foo FOO" situation, that may throw things off a bit.


-----Original Message-----
From: Greg Stein [mailto:gstein@lyra.org]
Sent: Friday, May 25, 2001 12:26 PM
To: Jeff Costlow; dav-dev@lyra.org
Cc: dev@apr.apache.org
Subject: Re: [dav-dev] FW: Case-insensitive file system moves

On Fri, May 25, 2001 at 01:47:04PM -0500, William A. Rowe, Jr. wrote:
> From: "Jeff Costlow" <j.costlow@f5.com>
> Sent: Friday, May 25, 2001 1:32 PM
> > > We've encountered a problem with mod_dav that applies only to moving objects
on case-insensitive filesystems (like NT).  I'm
> pretty sure this has been discussed before, but I don't recall the conclusion.
> > >
> > > Try to move a file like this:
> > > MOVE /file1.html HTTP/1.1
> > > Host: www.foo.bar
> > > Destination: http://www.foo.bar/FILE1.html
> > >
> > > on NT, this will result in a 403 error returned to the client, because apache
is detecting it as the same resource.
> > >
> > > It would be nice if this were to succeed and actually change the name of the
file.  Ideally it would work the same when moving a
> collection to a new name as well.
> > > Has anyone looked into mod_dav and thought about changing the code so that
if 2 resources did not strcmp, but were the same
> resource (according to apache), a rename would actually take place?
> That can be done more easily in the upcoming version.
> Not every win32 filesystem accepts ren foo FOO, so some of the logic needs to
> reside somewhere (Apache 2.0's APR) so the rename can proceed foo -> rand -> FOO.

Hrm. Interesting point.

Jeff (Costlow): I'd be happy to apply a patch if you've got one. I looks
like you would need something in dav_method_copymove(). (not much you could
do with dav_fs_repos for this issue)


Greg Stein, http://www.lyra.org/

View raw message