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

   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

Received on Wednesday, 15 August 2001 17:37:18 UTC