W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > July to September 2002

RE: What is left after LOCK/UNLOCK on null resource?

From: Clemm, Geoff <gclemm@rational.com>
Date: Wed, 4 Sep 2002 22:28:01 -0400
Message-ID: <3906C56A7BD1F54593344C05BD1374B10808D8AD@SUS-MA1IT01>
To: w3c-dist-auth@w3.org

   From: Michael Leditschke [mailto:mike@ammd.com.au]

   DAV locks are
   supposed to be capable of being held for an extended time.

Only by the process that took out the lock.

   I might 
   want to lock a resource, edit it for a while locally, then push the
   result back and unlock it again. Are you suggesting this all has
   to be done by the same OS process?

Yes.

   What happens if the power goes out and my PC reboots?

The new process needs to obtain its own (new) lock.  The old
lock is cleaned up by a timeout, or if allowed by the server,
the new process can clean up the old lock with an UNLOCK.
The new process shouldn't "reuse" the old lock, unless you have
some way of guaranteeing that two processes cannot both reuse the
old lock at the same time.

   Or perhaps you expect the client to cache locktokens?

Only if the cache has some way of guaranteeing that only one
process can obtain the cached locktoken.

   In my case, it is the same client I'm using to lock and unlock and
   I'm presenting the same credentials to the server. Its a low
   level test program, so I would have thought being able to unlock
   a resource of which I am the owner would be reasonable.

Unlocking is reasonable (unlike "reusing", which is not), but some
servers do not trust clients to appropriately unlock something they
didn't lock (since the client can't automatically know that it is
appropriate to do so, and even if it asks the user, the user can be
mistaken).  Those servers require clients to depend on timeouts.

Cheers,
Geoff
Received on Wednesday, 4 September 2002 22:28:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:44:01 GMT