Subject: RE: Comments regarding locking & auto-checkin...

From: "Clemm, Geoff" <[email-masked]>
Date: Wed, 15 Aug 2001 17:45:51 -0400

John asks:
   Is a PUT supposed to be rejected if the IF header provided specifies an
   invalid lock token and the resource is not locked?

   Jim Amsden replies:
   The if header would likely be ignored since the resource isn't
   locked and there's no token to check. But servers could implement
   this as a failed If header since it doesn't match the
   resource. Looks like a clarification might be needed in the spec.

I believe 2518 is reasonably clear on this point.  Section 9.4:

 The If header's purpose is to describe a series of state lists.  If
 the state of the resource to which the header is applied does not
 match any of the specified state lists then the request MUST fail
 with a 412 (Precondition Failed).  

So if you include a lock token, and it does not match the resource
to which you are applying the method, the PUT must fail with a 412.

Now there is some ambiguity about the meaning of "the resource
to which the header is applied" and no-tag-list productions.
For example, is the collection one of the resources to which
the header is applied, when you delete a member of the collection?
But that's a different discussion (:-).

Cheers,
Geoff

---

From: "Clemm, Geoff" <[email-masked]>
Date: Wed, 15 Aug 2001 17:49:47 -0400

From: Peter Raymond [mailto:[email-masked]]

   [Should] a more explicit error code should be returned when an If
   header specifies a lock which has timed-out rather than an invalid
   lock, I believe that at the moment a client cannot tell the
   difference.

I believe most servers do not store "used to be locked by" information
with a resource, so it would be very difficult for them to distinguish
between a lock which timed out and a lock with does not exist.

But in any case, why would a client really care about this distinction?

Cheers,
Geoff

---

From: "Jason Crawford" <[email-masked]>
Date: Sat, 18 Aug 2001 13:15:22 -0400

I've added that to the issues list as
CLARIFY_UNTAGGED_IF_HEADER_APPLICATION