RE: Infinite depth locks and unlocking

I believe the only sensible way to interpret depth infinity locks
are to say that:
- the lock is "on" the URL that was locked
- the lock "affects" the resource mapped to that URL, and if that resource
  is a collection, then it "affects" all members of that collection.

This means that we should extend the current lock discovery information
with the URL that the lock is "on", so that a client knows the scope of
the lock.  If this were added, it would be reasonable to require a client
to issue the UNLOCK against the locked URL.  The alternative is to allow
the UNLOCK to be applied to any URL that identifies a resource that is
affected by the lock.  I could live with that, if the working group prefers
it, but I prefer the "must unlock the locked URL" approach.  For one thing,
it is more compatible with the approach taken by the ACL spec for inherited
ACEs (i.e. you cannot change inherited ACEs).

Cheers,
Geoff 

-----Original Message-----
From: Alan Kent [mailto:ajk@mds.rmit.edu.au]
Sent: Friday, August 24, 2001 12:40 AM
To: WebDAV
Subject: Infinite depth locks and unlocking


Since locking is a bit of a rage at the moment, I just wanted to clarify
something relating to infinite depth locks.

I believe according to the spec that if I do a depth infinity lock
on /a/b/c then if I do an unlock on /a/b/c/d/e using the same lock
token, the lock is completely removed from all resources (that is,
from /a/b/c down).

Other possible interpretations that I think are not what the spec says are

(1) /a/b/c stays locked, only /a/b/c/d/e (and descdenants) are unlocked

(2) You are not permitted to unlock /a/b/c/d/e - you should unlock /a/b/c

I also noticed that if you successfully delete a resource (a binding?)
then 'all its locks are removed' which for a depth infinity lock
implies that if you delete /a/b/c/d/e then the lock on /a/b/c would
also be unlocked.

With the recent lock and lock null resource discussion, I was trying
to rethink what is the best way to implement locking with depth infinity.
I had previously come to the opinion that the easiest approach to get
the semantics right was to keep a lock table of URLs - not apply
the locks to the real resources. This is because you do not unlock
single resources, you remove the depth infinity lock from the table.
(There might have been other reasons as well.)

But the current semantics of depth infinity lock is not the same as
depth 0 locking all of the resources in the tree. This creates weird
edge cases (such as above) which I am not 100% of sure the correct/best
way to resolve.

Does anyone use depth infinity locks? How have people implemented them
such that deleting /a/b/c/d/e will remove the lock on the whole tree?
Or am I missing something here?

Thanks!
Alan

Received on Friday, 24 August 2001 09:15:48 UTC