<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?><!--<!DOCTYPE rfc SYSTEM "rfc2629.dtd">-->
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc subcompact="no"?>
<?rfc-ext parse-xml-in-artwork="yes" ?><rfc xmlns:x='http://purl.org/net/xml2rfc/ext' xmlns:ed="http://greenbytes.de/2002/rfcedit" ipr="full3667" updates="2518" docName="draft-reschke-webdav-locking-01" ed:entered-by="julian.reschke@greenbytes.de">
  <x:link rel="Start" href="http://greenbytes.de/tech/webdav/#draft-reschke-webdav-locking"/>
  <x:link rel="Bookmark" title="IETF WEBDAV Working Group" href="http://ftp.ics.uci.edu/pub/ietf/webdav/"/>
  <x:link rel="Alternate" title="(latest)" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-latest.html"/>
  <x:link rel="Alternate" title="draft 08" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-08.html"/>
  <x:link rel="Alternate" title="draft 07" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-07.html"/>
  <x:link rel="Alternate" title="draft 06" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-06.html"/>
  <x:link rel="Alternate" title="draft 05" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-05.html"/>
  <x:link rel="Alternate" title="draft 04" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-04.html"/>
  <x:link rel="Alternate" title="draft 03" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-03.html"/>
  <x:link rel="Alternate" title="draft 02" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-02.html"/>
  <x:link rel="Alternate" title="draft 01" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-01.html"/>
  <x:link rel="Alternate" title="draft 00" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-00.html"/>
  <x:link rel="next" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-02.html"/>
  <x:link rel="prev" href="http://greenbytes.de/tech/webdav/draft-reschke-webdav-locking-00.html"/>
	<front>
  <title abbrev="WebDAV URL constraints">Web Distributed Authoring and Versioning (WebDAV) Locking Protocol</title>

  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
    <organization abbrev="greenbytes">greenbytes GmbH</organization>
    <address>
      <postal>
        <street>Salzmannstrasse 152</street>
        <city>Muenster</city><region>NW</region><code>48159</code>
        <country>Germany</country>
      </postal>
      <phone>+49 251 2807760</phone>	
      <facsimile>+49 251 2807761</facsimile>	
      <email>julian.reschke@greenbytes.de</email>	
      <uri>http://greenbytes.de/tech/webdav/</uri>	
    </address>
  </author>

  <date month="May" year="2004"/>
  <!--<workgroup>WEBDAV Working Group</workgroup>-->
  
  <abstract>
    <t>
      This document specifies a set of methods and headers ancillary to
      HTTP/1.1 (RFC2616) and Distributed Authoring and Versioning (WebDAV, RFC2518) for the management of resource
      locking (collision avoidance).  It updates those sections from
      RFC2518 that specify WebDAV's locking features.
    </t>
    <ed:replace ed:resolves="edit" datetime="2004-05-29"><ed:del>
    <t>
      <cref source="reschke">
        Note that this document is not a product of the WebDAV working group.
        It is just an experiment to study the feasability of extracing the
        locking feature into a separate specification.
      </cref>
      <ed:del>
      <cref source="reschke">
        This version of this document doesn't yet contain any new or
        rewritten text - it only contains text copied verbatim fro RFC2518
        and GULP.  It's sole purpose is be a reference point for
        all future changes.
      </cref></ed:del>
    </t>
    <t>
      Distribution of this document is unlimited. Please send comments to the 
      WebDAV working group at <eref target="mailto:w3c-dist-auth@w3.org">w3c-dist-auth@w3.org</eref>, which may be joined by sending a message with subject 
      "subscribe" to <eref target="mailto:w3c-dist-auth-request@w3.org?subject=subscribe">w3c-dist-auth-request@w3.org</eref>.
    </t>
    <t>
      Discussions of the WEBDAV working group are archived at URL: 
      <eref target="http://lists.w3.org/Archives/Public/w3c-dist-auth/">http://lists.w3.org/Archives/Public/w3c-dist-auth/</eref>.               
    </t></ed:del></ed:replace>
  </abstract>

  <ed:replace ed:resolves="edit" datetime="2004-05-31"><ed:ins>
  <note title="Editorial Note">
    <t>
      <cref source="reschke">
        Note that this document is not a product of the WebDAV working group.
        It is just an experiment to study the feasability of extracing the
        locking feature into a separate specification.
      </cref>
      <ed:del>
      <cref source="reschke">
        This version of this document doesn't yet contain any new or
        rewritten text - it only contains text copied verbatim fro RFC2518
        and GULP.  It's sole purpose is be a reference point for
        all future changes.
      </cref></ed:del>
    </t>
    <t>
      Distribution of this document is unlimited. Please send comments to the 
      WebDAV working group at <eref target="mailto:w3c-dist-auth@w3.org">w3c-dist-auth@w3.org</eref>, which may be joined by sending a message with subject 
      "subscribe" to <eref target="mailto:w3c-dist-auth-request@w3.org?subject=subscribe">w3c-dist-auth-request@w3.org</eref>.
    </t>
    <t>
      Discussions of the WEBDAV working group are archived at URL: 
      <eref target="http://lists.w3.org/Archives/Public/w3c-dist-auth/">http://lists.w3.org/Archives/Public/w3c-dist-auth/</eref>.               
    </t>
  </note>  
  </ed:ins></ed:replace>
  
  
  </front>

<middle>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="extract-locking" type="change" status="closed">
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-14">
    Locking extracted from RFC2518.
  </ed:item>
  <ed:resolution datetime="2004-05-21">
    Finished as of draft 00.
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="updated-rfc2068" type="change" status="closed">
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Update references of RFC2068 to either RFC2396 or RFC2616.
  </ed:item>
  <ed:resolution datetime="2004-05-21">
    Done.
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="import-rfc3253-stuff" type="change" status="open">
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Import error marshalling and terminology from RFC3253.
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="import-gulp" type="change" status="open">
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-05-25">
    Make specification text compatible with GULP where it isn't. Integrate
    GULP as normative specification of the locking behaviour.
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="edit" type="edit" status="open">
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-05-25">
    Umbrella issue for editorial fixes/enhancements.
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="008_URI_URL" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1998OctDec/0142.html">
  <ed:item entered-by="masinter@parc.xerox.com" date="1998-11-09">
    Perform a thorough review of the specification to ensure that URI and URL are used correctly, and consistently throughout. 
  </ed:item>
  <ed:resolution>
    Seems to have been deferred: <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002AprJun/0216.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002AprJun/0216.html</a>,
    but there is some follow on discussion on what exactly needs to be clarified:
    <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0068.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0068.html</a>,
    but no specific action was concluded besides the fact that we don't need to wait for RFC2396 to be updated or request any changes/clarifications to that.
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_06" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
    Upon cursory reading of the rfc 2518 sec 8.10.4 through 8.11   I was confused by
    the plethoria of error codes.  Nothing seems to unify them.
    <br/>    
    8.10.4 speaks of a return code of 409 Conflict if a lock can't be granted.
    <br/>
    - Firstly, I can't tell if it is saying that the 409 is within the multistatus
    body... or in the response header.
    <br/>
    - Secondly, later text seems to use a different status codes and never
    mentions this one again.
    <br/>
    8.10.7 lists status codes
    <br/>
      - 200 OK, 412 Precondition Failed, and 423 Locked are listed, but 409 Conflict
    (mentioned above) is not.
    <br/>
      - In the case of 412 Precondition Failed, the description the follows doesn't
    seem to describe a "precondition failed".  And it sounds like it's talking about
    an access request that includes a "locktoken", not a LOCK request that generates
    one.
    <br/>
      - The 423 Locked condition also sort of sounds like it's talking about an
    access request rather than a LOCK request.
    <br/>
    8.10.10 lists LOCK status codes
    <br/>
       - 207 Multistatus which was not mentioned above
    <br/>
      -  403 Forbidden which was not mentioned above.
    <br/>
      -  424 Failed dependency which was not mentioned above.
    <br/>    
    8.11 UNLOCK
    <br/>
      - we don't mention what the failure response should look like.
    <br/>
      - comment: 200 OK seems like a better response than 204 No Content.    The
    brief explanation isn't persuasive and seems to say that the response code
    should serve the purpose of the Content-Length. header.
    <br/>
      - we should probably explicitly say if an UNLOCK can only be done on the
    original resource... and will fail even if the resource specified is locked by
    virtue of being a child of the original resource.  Or is this too obvious?  I
    know it's something easy to goof up in an implementation.
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_07" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
9.4 If header
    <br/>
  - BNF suggests that IF's content must be all tagged or all untagged.
    <br/>
  - doesn't say if there can be two If headers in a request.  Might we want a
tagged one and an untagged one?
    <br/>
  - I must be misunderstanding this, but it sounds to me like that state of a
resource(s) must match one of the locktokens listed in the request.  But what if
some of the resources are locked and others are not.  The unlocked resources
definitely won't contain state that's listed.    Are we precluding operations on
regions that might not be entirely locked?  -- Is this a valid observation or a
red herring?
    <br/>
9.4.1.1 If header - untagged example
    <br/>
  - See my comment about regions that are not entirely locked.
    <br/>
9.4.2 If header -tagged state
    <br/>
  - So if we've applied a lock with depth.... and now we're doing a DELETE on a
subtree of that tree and we've tagged the locktoken we've submitted, will this
prevent that locktoken from apply'ing to ALL the resources of the subtree... and
thus prevent the COPY from succeeding?  Or are we supposed to tag the lock token
with the root of the LOCK even if that is not part of what we are deleting?   Or
should the request use untagged locktokens?
    <br/>
9.4.3 If header - NOT operator
    <br/>
  - Why do we want this?   of course... why not?  :-)
    <br/>
Overall, the If header seems backwards for locktokens.  It's client driven
rather than server semantics driven.  The only feature it seems to provide is
perhaps the ability for the client to request that the request be aborted if the
resource no longer is locked.  Other than that it seems to complicate the simple
process of letting the server know what tokens you hold.   I'd think we'd just
want a different header to declare what lock tokens we hold and let the server
(not the client) decide how they affect the success of the request.
  </ed:item>
  <ed:resolution datetime="2004-05-24">
    This issue needs to be handled in the base protocol.
  </ed:resolution>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="044_REPORT_OTHER_RESOURCE_LOCKED" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999JulSep/0039.html">
  <ed:item entered-by="wiggs@xythos.com" date="1999-07-23">
    In some cases, such as when the parent collection of a resource is locked, a 423 (Locked) status code is returned even though the resource identified by the Request-URI is not locked. This can be confusing, since it is not possible for a client to easily discover which resource is causing the locked status code to be returned. An improved status report would indicate the resource causing the lock message.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Proposal to define a specific precondition element plus specific
    child elements similar to <a href="http://greenbytes.de/tech/webdav/rfc3744.html#rfc.section.7.1.1">RFC3744, section 7.1.1</a>.
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="052_LOCK_BODY_SHOULD_BE_MUST" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999OctDec/0224.html">
  <ed:item entered-by="gstein@lyra.org" date="1999-11-23">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.8.10.1">Section 8.10.1</a> states that a LOCK method request SHOULD have an XML request body. This SHOULD should instead be MUST.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Clarify that for creating LOCKs, it MUST have a request body which
    SHOULD have the DAV:owner element. For LOCK refreshes, no body is
    required.
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="054_IF_AND_AUTH" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2000JanMar/0211.html">
  <ed:item entered-by="geoffrey.clemm@rational.com" date="2000-01-27">
    The fact that use of authentication credentials with submission of lock
    tokens is required should be strengthened in the document.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-05-02">
    Submitting the lock token in an If header (usages != UNLOCK) SHOULD be
    restricted to whatever the server thinks the "owner" of the lock is. 
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="056_DEPTH_LOCK_AND_IF" type="change" status="open" href="http://dav.lyra.org/pipermail/dav-dev/2000-March/000830.html">
  <ed:item entered-by="joe@orton.demon.co.uk" date="2000-03-04">
    The specification is currently silent on how to use the If header for
    submitting a locktoken when performing a DELETE in a Depth infinity locked
    collection.  Should the If header have both the collection URL and the
    Request-URI, or just the Request-URI? An example of this is needed.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Clarify as part of integrating GULP. May need to test interop with existing
    implementations.
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="057_LOCK_SEMANTICS" type="change" status="open">
  <ed:item>
    At present, the WebDAV specification is not excruciatingly explicit that
    writing to a locked resource requires the combination of the lock token,
    plus an authentication principal. At one point, the spec. discusses an
    "authorized" principal, but "authorized" is never explicitly defined.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-05-02">
    Submitting the lock token in an If header (usages != UNLOCK) SHOULD be
    restricted to whatever the server thinks the "owner" of the lock is. 
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="063_LOCKS_SHOULD_THEY_USE_AN_IF_HEADER_TO_VERIFY" type="change" status="open">
  <ed:item entered-by="jrd3@alum.mit.edu">
    Is the complexity of the IF header appropriate for the simple task o
    verifying that a client knowingly owns a lock?  The IF header seems to
    serve a different purpose.  One of those purposes is for the server to
    verify that you have the lock token (and that you know the root of it?).
    Another is for the client to check some preconditions before doing an
    action.  Another seems to be to specify what lock to refresh in a lock
    refresh request.  This seems to create ambiguity in our definition of the
    semantics of the IF: header.
  </ed:item>
  <ed:item entered-by="ccjason@us.ibm.com" datetime="2002-01-14">
    It is felt by the group that it's important that the client not just own
    and hold the lock token, but that it also know where the lock is rooted
    before it does tasks related to that lock.  This still leaves the lock
    referesh issue unresolved.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Need Lock-Token header to indicate the lock to be refreshed.
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="066_MUST_AN_IF_HEADER_CHECK_THE_ROOT_OF_URL" type="change" status="open">
  <ed:item>
    Right now the server uses the IF: header to verify that a client knows what
    locks it has that are affected by an operation before it allows the
    operation.  Must the client provide the root URL of a lock, any URL for a
    pertainent loc, or some specific URL  in the IF: header.
  </ed:item>
  <ed:item entered-by="ccjason@us.ibm.com" datetime="2002-01-14">
    It is felt by the group that it's important that the client not just own 
    and hold the lock token, but that it also know where the lock is rooted
    before it does tasks related to that lock.  This is just a point of info.
    The issue itself still needs to be brought up and answered.still
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="067_UNLOCK_NEEDS_IF_HEADER" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0099.html">
  <ed:item entered-by="dbrotsky@Adobe.COM" datetime="2001-03-02">
    Shouldn't we be using an IF header to do an UNLOCK seeing as you need to
    prove you are holding a lock before you can remove it?  (This might be
    contingent on <a href="#rfc.issue.063_LOCKS_SHOULD_THEY_USE_AN_IF_HEADER_TO_VERIFY">063_LOCKS_SHOULD_THEY_USE_AN_IF_HEADER_TO_VERIFY</a>)
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="068_UNLOCK_WITHOUT_GOOD_TOKEN" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0099.html">
  <ed:item entered-by="dbrotsky@Adobe.COM" datetime="2001-03-02">
    What should UNLOCK return if a bad token is provided or no token.
    (This might be contingent on <a href="#rfc.issue.UNLOCK_NEEDS_IF_HEADER">UNLOCK_NEEDS_IF_HEADER</a>.)
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="070_LOCK_RENEWAL_SHOULD_NOT_USE_IF_HEADER" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0109.html">
  <ed:item entered-by="dbrotsky@Adobe.COM" datetime="2001-03-02">
  	The LOCK renewal request should not us an IF header to specify what lock is
    being renewed.  This limits the use of the IF header.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Need Lock-Token header to indicate the lock to be refreshed.
  </ed:item>  
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="072_LOCK_URL_WITH_NO_PARENT_COLLECTION" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0134.html">
  <ed:item entered-by="dbrotsky@Adobe.COM" datetime="2001-03-19">
  	If a LOCK request is submitted to a URL that doesn't have a parent collection, what should be the correct response? Other methods, PUT, MKCOL, COPY, MOVE all require a 409 response in this case. Seems like LOCK should have this requirement as well.
  </ed:item>
  <ed:resolution>
    Resolved that since LNRs no longer exist (see  NULL_RESOURCE_CLARIFY) the
    server should return 409. We should insure that the new text we add to
    replace LNRs does not create an ambiguity: <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0164.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0164.html</a>
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="079_UNLOCK_BY_NON_LOCK_OWNER" type="change" status="open">
  <ed:item entered-by="lisa@xythos.com">
  	At present, the specification is not explicit about who might be capable of
    grabbing a lock token via lock discovery and the submitting it in UNLOCK
    (and/or for a subsequent write operation). It is OK for the resource owner
    to grab the lock token and do UNLOCK/write? Is it OK to have a "grab lock
    token" privilege that can be assigned to anyone?
  </ed:item>
  <ed:resolution>
    Resolved in part by putting it under ACL control:
    <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0002.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0002.html</a>
    and the response that follows it.
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="088_DAVOWNER_FIELD_IS_CLIENT_CONTROLED" type="change" status="open">
  <ed:item>
  	The DAV:owner field of a lock is controlled by the locking client and should
    not be manipulated by the server.  This is the only place the client can
    store info.  The roundtrip details should match what we resolve for the
    PROP_ROUNDTRIP issue.  Examples should also be checked.
  </ed:item>
  <ed:resolution>
    Resolved by repeated statement and no disagreement.
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="099_COPYMOVE_LOCKED_STATUS_CODE_CLARIFICATION" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002AprJun/0079.html">
  <ed:item entered-by="ccjason@us.ibm.com" datetime="2002-05-02">
    What resource should be flagged in the multistatus response to locking issues in COPY/MOVE requests?
  </ed:item>
  <ed:resolution>
    Resolved to flag the locking errors at the source resource that was affected by the problem.
    The details of how to describe the error was deferred to a subsequent version of WebDAV. - 6/15/02 - 2518bis does not reflect this.
  </ed:resolution>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="100_COPYMOVE_LOCKED_STATUS_DESCRIPTION" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002AprJun/0079.html">
  <ed:item>
    The method of describing the details of (beyond what resolved by
    COPYMOVE_LOCKED_STATUS_CODE_CLARIFICATION) of the underlying cause of
    various locking and ACL  COPY/MOVE problems is deferred.  Two proposals
    were outlined in the discussion, but interest was not great and we clearly
    don't have interoperability to take these proposals forward.
  </ed:item>
</ed:issue>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="rfc2606-compliance" type="editor" status="closed">
  <ed:item date="2004-05-23" entered-by="julian.reschke@greenbytes.de">
    Ensure that examples use only sample domains as per RFC2606.
  </ed:item>
  <ed:resolution datetime="2004-05-24">
    Done.
  </ed:resolution>
</ed:issue>

<section title="Introduction">

<ed:replace datetime="2004-05-30" ed:resolves="import-rfc3253-stuff"><ed:ins>
<section title="Terminology" anchor="terminology">
<t>
  The terminology used here follows and extends that in the WebDAV Distributed
  Authoring Protocol specification <xref target="RFC2518"/>.
</t>
<t>
  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
  "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
  interpreted as described in <xref target="RFC2119"/>. 
</t>
<t>
  This document uses XML DTD fragments 
  (<xref target="XML"/>) as a purely notational convention.
  WebDAV request and response bodies cannot be validated due to the specific
  extensibility rules defined in section 23 of <xref target="RFC2518"/> and due to the fact
  that all XML elements defined by this specification use the XML namespace
  name "DAV:".  In particular:
  <list style="symbols">
    <t>Element names use the "DAV:" namespace.</t>
    <t>Element ordering is irrelevant.</t>
    <t>Extension elements/attributes (elements/attributes not already defined
    as valid child elements) may be added anywhere, except when explicitly
    stated otherwise.</t> 
  </list>
</t>
</section>

<section title="Method Preconditions and Postconditions" anchor="method.preconditions.and.postconditions">
<t>
  A "precondition" of a method describes the state on the server that must be
  true for that method to be performed.  A "postcondition" of a method
  describes the state on the server that must be true after that method has
  completed.  If a method precondition or postcondition for a request is not
  satisfied and unless the specific condition does not define a more specific
  HTTP status code, the response status of the request MUST be either 403 (Forbidden)
  if the request should not be repeated because it will always fail, or 409
  (Conflict) if it is expected that the user might be able to resolve the
  conflict and resubmit the request.
</t>
<t>
  In order to allow better client handling of error responses, a
  distinct XML element type is associated with each method precondition and
  postcondition of a request.  When a particular precondition is not satisfied
  or a particular postcondition cannot be achieved, the appropriate XML element
  MUST be returned as the child of a top-level DAV:error element in the
  response body, unless otherwise negotiated by the request.  In a 207
  Multi-Status response, the DAV:error element would appear in the
  appropriate DAV:responsedescription element.
</t>
</section>
</ed:ins></ed:replace>
</section>

<section title="Overview of Locking">
</section>

<section title="Properties">
<ed:replace ed:resolves="edit" datetime="2004-05-30"><ed:ins>
<t>
  The locking feature introduces the following properties for a resource.
</t>
<section title="Common XML elements used in property values">
<section title="Lock Scopes">
<figure>
<artwork>
   &lt;!ELEMENT lockscope (exclusive | shared) &gt;
   &lt;!ELEMENT exclusive EMPTY &gt;
   &lt;!ELEMENT shared EMPTY &gt;
</artwork>
</figure>
</section>

<section title="Lock Types">
<figure>
<artwork>
   &lt;!ELEMENT locktype (write) &gt;
   &lt;!ELEMENT write EMPTY &gt;
</artwork>
</figure>
<t>
  At present, this specification only defines one lock type, the write lock.
</t>
</section>
</section>

<section title="DAV:lockdiscovery property">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="073_LOCKDISCOVERY_ON_UNLOCKED_RESOURCE" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0128.html">
  <ed:item entered-by="hwarncke@Adobe.COM" datetime="2001-03-15">
  	If the DAV:lockdiscovery property is requested from an unlocked resource,
    what is the correct response? Apache mod_dav responds with an empty mod_dav
    sends an empty lockdiscovery element (&lt;D:lockdiscovery/&gt;) while IIS sends
    an empty prop element (&lt;D:prop/&gt;), that is, it sends no lockdiscovery
    element at all.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    The difference shouldn't matter for clients, and they need to expect both.
    In general, servers that DO support locks on that resource should return
    an empty element.
  </ed:item>  
  <ed:resolution datetime="2004-05-30">
    Added example.
  </ed:resolution>
</ed:issue>
<iref item="DAV:lockdiscovery property" primary="true"/>
<iref item="Properties" subitem="DAV:lockdiscovery" primary="true"/>
<t>
  The DAV:lockdiscovery property returns a listing of who has
  a lock, what type of lock he has, the timeout type, the time
  remaining on the timeout, the associated lock token and the root of the lock.  The 
  server is free to withhold any or all of this information if the requesting
  principal does not have sufficient access rights to see the requested
  data.
</t>
<figure><artwork>
   &lt;!ELEMENT lockdiscovery (activelock)* &gt;
</artwork></figure>
<figure><artwork>
   &lt;!ELEMENT activelock (lockscope, locktype, depth, owner?,
                         timeout?, locktoken?, lockroot) &gt;
</artwork></figure>
<figure>
<preamble>
depth: the value of the Depth header (see <xref target="HEADER_Depth"/>; takes
the values "0", "1" or "infinity".
</preamble>
<artwork>
   &lt;!ELEMENT depth (#PCDATA) &gt;
</artwork></figure>
<figure>
<preamble>
owner: provides information about the principal taking out a lock; should be
sufficient for either directly contacting a principal (such as a
telephone number or email URI), or for discovering the principal (such as the
URL of a homepage).
</preamble>
<artwork>
   &lt;!ELEMENT owner ANY&gt;
</artwork></figure>
<figure>
<preamble>
timeout: the timeout associated with a lock (defined in <xref target="HEADER_Timeout"/>).
</preamble>
<artwork>
   &lt;!ELEMENT timeout (#PCDATA) &gt;
</artwork></figure>
<figure>
<preamble>
locktoken: the lock token associated with a lock; the href element contains
the lock token.
</preamble>
<artwork>
   &lt;!ELEMENT locktoken (href) &gt;
</artwork></figure>
<figure>
<preamble>
lockroot: the URL of the resource that was addressed in the LOCK request; the 
href element contains the URL of the resource to which the LOCK request has been
applied.
</preamble>
<artwork>
   &lt;!ELEMENT lockroot (href) &gt;
</artwork></figure>
<figure>
<preamble>
href: defined in <xref target="RFC2518"/>, section 12.3.
</preamble>
<artwork>
   &lt;!ELEMENT lockroot (href) &gt;
</artwork></figure>

<section title="Examples for the DAV:lockdiscovery">
<figure>
  <preamble>
  DAV:lockdiscovery property for a resource that has two shared write locks on
  it, with infinite timeouts:  
  </preamble>
<artwork>
   &lt;D:lockdiscovery xmlns:D="DAV:"&gt;
     &lt;D:activelock&gt;
       &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
       &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
       &lt;D:depth&gt;0&lt;/D:depth&gt;
       &lt;D:owner&gt;Jane Smith&lt;/D:owner&gt;
       &lt;D:timeout&gt;Infinite&lt;/D:timeout&gt;
       &lt;D:locktoken&gt;
         &lt;D:href
   &gt;opaquelocktoken:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d76&lt;/D:href&gt;
       &lt;/D:locktoken&gt;
       &lt;D:lockroot&gt;
         &lt;D:href
   &gt;http://example.com/container/&lt;/D:href&gt;
       &lt;/D:lockroot&gt;
     &lt;/D:activelock&gt;
   &lt;/D:lockdiscovery&gt;
   &lt;D:lockdiscovery&gt;
     &lt;D:activelock&gt;
       &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
       &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
       &lt;D:depth&gt;0&lt;/D:depth&gt;
       &lt;D:owner&gt;John Doe&lt;/D:owner&gt;
       &lt;D:timeout&gt;Infinite&lt;/D:timeout&gt;
       &lt;D:locktoken&gt;
         &lt;D:href
   &gt;opaquelocktoken:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d77&lt;/D:href&gt;
       &lt;/D:locktoken&gt;
       &lt;D:lockroot&gt;
         &lt;D:href
   &gt;http://example.com/container/&lt;/D:href&gt;
       &lt;/D:lockroot&gt;
     &lt;/D:activelock&gt;
   &lt;/D:lockdiscovery&gt;
</artwork>
</figure>
<figure>
  <preamble>
  DAV:lockdiscovery property for a resource with no locks on it:  
  </preamble>
<artwork>
   &lt;D:lockdiscovery xmlns:D="DAV:"/&gt;
</artwork>
</figure>
</section>
</section>

<section title="DAV:supportedlock property">
<iref item="DAV:supportedlock property" primary="true"/>
<iref item="Properties" subitem="DAV:supportedlock" primary="true"/>
<t>
  The DAV:supportedlock property of a resource returns a
  listing of the combinations of scope and access types which may be
  specified in a lock request on the resource.  Note that the actual
  contents are themselves controlled by access controls so a server is
  not required to provide information the client is not authorized to
  see.
</t>
<figure><artwork>
   &lt;!ELEMENT supportedlock (lockentry)* &gt;
   &lt;!ELEMENT lockentry (lockscope, locktype) &gt;
</artwork></figure>

<section title="Examples for the DAV:supportedlock property">
<figure>
<preamble>
  DAV:supportedlock property for a resource that supports both exclusive
  and shares write locks:
</preamble>
<artwork>
   &lt;D:supportedlock xmlns:D="DAV:"&gt;
     &lt;D:lockentry&gt;
       &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
       &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
     &lt;/D:lockentry&gt;
     &lt;D:lockentry&gt;
       &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
       &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
     &lt;/D:lockentry&gt;
   &lt;/D:supportedlock&gt;
</artwork>
</figure>
<figure>
<preamble>
  DAV:supportedlock property for a resource that doesn't support any locks
  at all:
</preamble>
<artwork>
   &lt;D:supportedlock xmlns:D="DAV:"/&gt;
</artwork>
</figure>
</section>
</section>
</ed:ins></ed:replace>
</section>

<section title="LOCK Method">
</section>

<section title="UNLOCK Method">
</section>

<section title="Additional status codes">
<ed:replace datetime="2004-05-30" ed:resolves="edit"><ed:ins>
<section title="423 Locked" anchor="deleted-STATUS_423">
<iref item="423 Locked (status code)" primary="true"/>
<iref item="Status Codes" subitem="423 Locked" primary="true"/>
<t>
   The 423 (Locked) status code means the source or destination resource
   of a method is locked.
</t>
</section>
</ed:ins></ed:replace>
</section>

<section title="Additional method semantics for other Methods">
</section>

<section title="Capability discovery" anchor="capability.discovery">
<ed:replace ed:resolves="edit" datetime="2004-05-31"><ed:ins>
<section title="OPTIONS method">
<iref item="DAV header" subitem="compliance class '2'"/>
<iref item="DAV header" subitem="compliance class 'locking'"/>
<t>
  If the server supports locking, it MUST return both the compliance class names
  "2" and "locking" as fields in the "DAV" response header (see <xref target="RFC2518"/>,
  section 9.1) from an OPTIONS request on any resource implemented by that
  server.  A value of "2" or "locking" in the "DAV" response header MUST indicate that
  the server meets all class "1" requirements defined in <xref target="RFC2518"/>
  and supports all MUST level requirements and REQUIRED features
  specified in this document, including:
  <list style="symbols">
    <t>LOCK and UNLOCK methods,</t>
    <t>DAV:lockdiscovery and DAV:supportedlock properties,</t>
    <t>"Time-Out" request header, "Lock-Token" request and response header.</t>
  </list>
</t>
<t>
  Note that for servers implementing this specification, the compliance classes
  "2" and "locking" are synonymous.  However, new clients can take advantage
  of the new "locking" compliance class to detect server support for changes
  introduced by this specification (see <xref target="changes.to.rfc2518"/>).
</t>
</section>
</ed:ins></ed:replace>
</section>

<section title="Security considerations" anchor="security.considerations">
<ed:replace datetime="2004-05-31" ed:resolves="edit"><ed:ins>
<t>
  All security considerations mentioned in <xref target="RFC2518"/> also apply to
  this document.  Additionally, lock tokens introduce new privacy issues
  discussed below.
</t>
<section title="Privacy Issues Connected to Locks" anchor="risks.connected.with.lock.tokens">
<t>
   When submitting a lock request a user agent may also submit an owner
   XML field giving contact information for the person taking out the
   lock (for those cases where a person, rather than a robot, is taking
   out the lock).  This contact information is stored in a DAV:lockdiscovery
   property on the resource, and can be used by other collaborators to
   begin negotiation over access to the resource.  However, in many
   cases this contact information can be very private, and should not be
   widely disseminated.  Servers SHOULD limit read access to the
   DAV:lockdiscovery property as appropriate.  Furthermore, user agents
   SHOULD provide control over whether contact information is sent at
   all, and if contact information is sent, control over exactly what
   information is sent.
</t>
</section></ed:ins></ed:replace>
</section>

<section title="Internationalization Considerations" anchor="internationalization.considerations">
<t>
  All internationalization considerations mentioned in <xref target="RFC2518"/> also apply to
  this document.
</t>
</section>

<section title="IANA Considerations" anchor="iana.considerations">
<ed:replace ed:resolves="edit" datetime="2004-05-31"><ed:del>
<t>
  All IANA considerations mentioned in <xref target="RFC2518"/> also apply to this document.
</t>
</ed:del><ed:ins>
<t>
  This specification updates the definition of the "opaquelocktoken" URI scheme
  described in <xref target="opaquelocktoken.lock.token.uri.scheme"/>, registered
  my means of <xref target="RFC2518"/>, section 6.4.  There are no additional
  IANA considerations.
</t>
</ed:ins></ed:replace>
</section>

<section title="Acknowledgements" anchor="acknowledgments">
<t>
  This document is the collaborative product of
  <list style="symbols">
    <t>the authors,</t>
    <t>the maintainers of <ed:del>the </ed:del> RFC2518bis - Jason Crawford and Lisa Dusseault - and</t>
    <t>the original authors of RFC2518 - Steve Carter, Asad Faizi, Yaron Goland,
    Del Jensen and Jim Whitehead.</t>
  </list>
  This document has also benefited from thoughtful discussion by
  Mark Anderson,
  Dan Brotksy, Geoff Clemm, Jim Davis, Stefan Eissing, Rickard Falk, Larry Masinter,
  Joe Orton, Juergen Pill, Elias Sinderson, Greg Stein, Kevin Wiggen,
  and other members of the WebDAV working group.
</t>
</section>

</middle>

	<back>


  <references title="Normative References">
  
    <reference anchor="RFC2119">
      <front>
        <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
        <author initials="S." surname="Bradner" fullname="Scott Bradner">
        <organization>Harvard University</organization>
        <address>
          <email>sob@harvard.edu</email>
        </address></author>
        <date month="March" year="1997"/>
      </front>
      <seriesInfo name="BCP" value="14"/>
      <seriesInfo name="RFC" value="2119"/>
    </reference>

    <reference anchor='RFC2396'>
      <front>
        <title abbrev='URI Generic Syntax'>Uniform Resource Identifiers (URI): Generic Syntax</title>
        <author initials='T.' surname='Berners-Lee' fullname='Tim Berners-Lee'>
          <organization>World Wide Web Consortium</organization>
          <address>
            <email>timbl@w3.org</email>
          </address>
        </author>
        <author initials='R.T.' surname='Fielding' fullname='Roy T. Fielding'>
          <organization>Department of Information and Computer Science</organization>
          <address>
            <email>fielding@ics.uci.edu</email>
          </address>
        </author>
        <author initials='L.' surname='Masinter' fullname='Larry Masinter'>
          <organization>Xerox PARC</organization>
          <address>
            <email>masinter@parc.xerox.com</email>
          </address>
        </author>
        <date month='August' year='1998'/>
      </front>  
      <seriesInfo name='RFC' value='2396' />
    </reference>

    <reference anchor="RFC2518">
      <front>
        <title>HTTP Extensions for Distributed Authoring -- WEBDAV</title>
        <author initials="Y." surname="Goland" fullname="Y. Goland">
          <organization>Microsoft Corporation</organization>
          <address><email>yarong@microsoft.com</email></address>
        </author>
        <author initials="E." surname="Whitehead" fullname="E. J. Whitehead, Jr.">
          <organization abbrev="UC Irvine">Dept. Of Information and Computer Science, University of California, Irvine</organization>
        	<address><email>ejw@ics.uci.edu</email></address>
        </author>
        <author initials="A." surname="Faizi" fullname="A. Faizi">
          <organization abbrev="Netscape">Netscape</organization>
          <address><email>asad@netscape.com</email></address>
        </author>
        <author initials="S.R." surname="Carter" fullname="S. R. Carter">
          <organization abbrev="Novell">Novell</organization>
          <address><email>srcarter@novell.com</email></address>
        </author>
        <author initials="D." surname="Jensen" fullname="D. Jensen">
          <organization abbrev="Novell">Novell</organization>
          <address><email>dcjensen@novell.com</email></address>
        </author>
        <date month="February" year="1999"/>
      </front>
      <seriesInfo name="RFC" value="2518"/>
    </reference>  

<ed:replace datetime="2004-05-21" ed:resolves="updated-rfc2068"><ed:del>
    <reference anchor='RFC2068'>
      <front>
        <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
        <author initials='R.' surname='Fielding' fullname='R. Fielding'>
          <organization>University of California</organization>
          <address>
            <email>fielding@ics.uci.edu</email>
          </address>
        </author>
        <author initials='J.' surname='Gettys' fullname='J. Gettys'>
          <organization>MIT Laboratory for Computer Science</organization>
          <address>
            <email>jg@w3.org</email>
          </address>
        </author>
        <author initials='J.' surname='Mogul' fullname='J. Mogul'>
          <organization>Digital Equipment Corporation</organization>
          <address>
            <email>mogul@wrl.dec.com</email>
          </address>
        </author>
        <author initials='H.' surname='Frystyk' fullname='H. Frystyk'>
          <organization>W3 Consortium</organization>
          <address>
            <email>frystyk@w3.org</email>
          </address>
        </author>
        <author initials='T.' surname='Berners-Lee' fullname='T. Berners-Lee'>
          <organization>W3 Consortium</organization>
          <address>
            <email>timbl@w3.org</email>
          </address>
        </author>
        <date month='January' year='1997'/>
      </front>
      <seriesInfo name='RFC' value='2068'/>
    </reference>
</ed:del><ed:ins>
    <reference anchor="RFC2616">
      <front>
        <title>Hypertext Transfer Protocol -- HTTP/1.1</title>
        <author initials="R." surname="Fielding" fullname="R. Fielding">
          <organization>University of California, Irvine</organization>
          <address><email>fielding@ics.uci.edu</email></address>
        </author>
        <author initials="J." surname="Gettys" fullname="J. Gettys">
          <organization>W3C</organization>
          <address><email>jg@w3.org</email></address>
        </author>
        <author initials="J." surname="Mogul" fullname="J. Mogul">
          <organization>Compaq Computer Corporation</organization>
          <address><email>mogul@wrl.dec.com</email></address>
        </author>
        <author initials="H." surname="Frystyk" fullname="H. Frystyk">
          <organization>MIT Laboratory for Computer Science</organization>
          <address><email>frystyk@w3.org</email></address>
        </author>
        <author initials="L." surname="Masinter" fullname="L. Masinter">
          <organization>Xerox Corporation</organization>
          <address><email>masinter@parc.xerox.com</email></address>
        </author>
        <author initials="P." surname="Leach" fullname="P. Leach">
          <organization>Microsoft Corporation</organization>
          <address><email>paulle@microsoft.com</email></address>
        </author>
        <author initials="T." surname="Berners-Lee" fullname="T. Berners-Lee">
          <organization>W3C</organization>
          <address><email>timbl@w3.org</email></address>
        </author>
        <date month="June" year="1999"/>
      </front>
      <seriesInfo name="RFC" value="2616"/>
    </reference>
</ed:ins></ed:replace>
    <reference anchor="ISO-11578">
      <front>
        <title abbrev="ISO 11578">ISO/IEC 11578:1996. Information technology - Open
        Systems Interconnection - Remote Procedure Call
        (RPC)</title>
        <author>
          <organization>International Organization for Standardization</organization>
          <address>
            <uri>http://www.iso.ch</uri>
          </address>
        </author>
        <date year="1996"/>
      </front>
    </reference>

    <reference anchor="XML" target="http://www.w3.org/TR/2004/REC-xml-20040204">
      <front>
        <title>Extensible Markup Language (XML) 1.0 (Third Edition)</title>
        <author initials="T." surname="Bray" fullname="Tim Bray">
          <organization>Textuality and Netscape</organization>
          <address>
            <email>tbray@textuality.com</email>
          </address>
        </author>
        <author initials="J." surname="Paoli" fullname="Jean Paoli">
          <organization>Microsoft</organization>
          <address>
            <email>jeanpa@microsoft.com</email>
          </address>
        </author>
        <author initials="C.M." surname="Sperberg-McQueen" fullname="C. M. Sperberg-McQueen">
          <organization>University of Illinois at Chicago and Text Encoding Initiative</organization>
          <address>
            <email>cmsmcq@uic.edu</email>
          </address>
        </author>
        <author initials="E." surname="Maler" fullname="Eve Maler">
          <organization>Sun Microsystems</organization>
          <address>
            <email>eve.maler@east.sun.com</email>
          </address>
        </author>
        <author initials="F." surname="Yergeau" fullname="Francois Yergeau">
          <organization/>
          <address>
            <email>francois@yergeau.com</email>
          </address>
        </author>
        <date day="4" month="February" year="2004"/>
      </front>
      <seriesInfo name="W3C" value="REC-xml-20040204"/>
    </reference>

  </references>
  

<section title="Changes to RFC2518" anchor="changes.to.rfc2518">
<ed:replace><ed:ins>
<t>
  See <xref target="capability.discovery"/> for a description about how clients
  can discover support for this version of the WebDAV Locking protocol.
</t>
</ed:ins></ed:replace>
<section title="Removed/Deprecated features">
<ed:replace datetime="2004-05-25" ed:resolves="025_LOCK_REFRESH_BY_METHODS"><ed:ins>
<section title="Implicit lock refresh">
<t>
  In section 9.8, <xref target="RFC2518"/> specifies that locks should be
  refreshed implicitly every time "...any time an owner of the lock sends a
  method to any member of the lock, including unsupported methods, or methods
  which are unsuccessful."  This features has been removed (locks need to
  be refreshed explicitly using the LOCK method).
</t>
<t>
  Compatibility considerations
  <list><t>
    Clients historically have never relied on this feature as it was never
    implemented in widely deployed WebDAV servers.
  </t></list>
</t>
</section>
</ed:ins></ed:replace>

<ed:replace datetime="2004-05-25" ed:resolves="080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC"><ed:ins>
<section title="Lock-null resources">
<t>
  In section 7.4, <xref target="RFC2518"/> specifies a special resource type
  called "lock-null resource" that's being created when a LOCK method
  request is applied to a null resource.  In practice, no real interoperability
  was achieved because many servers failed to implement this feature properly
  and few clients (if any) ever relied on that particular functionality.
</t>
<t>
  Removing this feature also means that there is no atomic way to create a collection
  in locked state, but in practice, this doesn't seem to be a problem.
</t>
<t>
  Compatibility considerations
  <list><t>
    There do not seem to be any widely deployed clients that actually relied
    on "lock-null resources".
  </t></list>
</t>
</section>
</ed:ins></ed:replace>

</section>

<section title="Additional features">
<ed:replace datetime="2004-05-22" ed:resolves="089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK"><ed:ins>
<section title="DAV:lockroot element in DAV:activelock">
<t>
  Clients can take advantage of the new DAV:lockroot element to discover the URL
  to which the LOCK request (that created the lock) was applied.
</t>
<t>
  Compatiblity consideration
  <list><t>
    Clients will have to fail gracefully when communicating with older servers
    that do not support the new property.
  </t></list>
</t>
</section>
</ed:ins></ed:replace>
</section>

</section>


<section title="Text to be integrated from RFC2518">

<section title="Introduction">
<t>
   Locking: The ability to keep more than one person from working on a
   document at the same time. This prevents the "lost update problem,"
   in which modifications are lost as first one author then another
   writes changes without merging the other author's changes.
</t>
</section>

<section title="Locking" anchor="locking">
<t>
   The ability to lock a resource provides a mechanism for serializing
   access to that resource.  Using a lock, an authoring client can
   provide a reasonable guarantee that another principal will not modify
   a resource while it is being edited.  In this way, a client can
   prevent the "lost update" problem.
</t>
<t>
   This specification allows locks to vary over two client-specified
   parameters, the number of principals involved (exclusive vs. shared)
   and the type of access to be granted. This document defines locking
   for only one access type, write. However, the syntax is extensible,
   and permits the eventual specification of locking for other access
   types.
</t>

<section title="Exclusive Vs. Shared Locks">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_08" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
Shared locks... read locks...
    <br/>
Our justifcation for shared locks  ("Shared locks are included because....")
seems faulty.  It's not a mechansim for dealing with programs that forget to
release their locks.   That remains a problem with shared locks.  In this case
they'd forget to release a shared lock and block exclusive lock users.  Timeouts
and administrative action are the solutions to this problem... not shared locks.
    <br/>
BTW, I'd think that the use of exclusive locks is just fine.  I do have a
problem with shared locks though... or at least shared write locks.  Although
they were relatively easy to define, I see them as solving a red herring problem
of multiple entites cooperatively writing using distinct locks.  I say it's a
red herring because they don't know each other well enough to use the same lock
but they do know each other well enough to not step on each other.  This seems
unlikely.   As does the managing a compatibility matrix and getting all the
entities to abide by it.
    <br/>
OTOH I see another more common problem that is being overlooked.  I see a class
of folks whose purpose is to not actually write to a (set of) resource(s), but
to simply prevent others from writing to it while they are looking at it.
Shared write locks do not necessarily do that because with a shared write lock.
someone else could grab a shared lock and go ahead and write.   The only way to
block that is to get an exclusive write lock.  But doing that prevents anyone
else from doing what you're doing despite it being pretty benign.
    <br/>
An expedient solution is to say that a shared write lock should not necessarily
give one the right to modify a resource.  All it should do is prevent others
from writing.  And then the purpose of an exclusive write lock is just to insure
that others can't get a lock and block you from writing.    Now is this the
right solution?  Probably not.   There probably should be something called a
read lock that actually prevents writes as a side effect.... and would tend to
get used in shared mode.
    <br/>
Anyway, as it is, I think the shared write locks are a red herring and we're
missing something we are more likely to need... shared read locks.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-24">
   Agreement that the rational for shared locks either needs to be rewritten
   or deleted. However shared locks are a fact, and we shouldn't change the
   semantics given in RFC2518.
  </ed:item>  
</ed:issue>
<t>
   The most basic form of lock is an exclusive lock.  This is a lock
   where the access right in question is only granted to a single
   principal.  The need for this arbitration results from a desire to
   avoid having to merge results.
</t>
<t>
   However, there are times when the goal of a lock is not to exclude
   others from exercising an access right but rather to provide a
   mechanism for principals to indicate that they intend to exercise
   their access rights.  Shared locks are provided for this case.  A
   shared lock allows multiple principals to receive a lock.  Hence any
   principal with appropriate access can get the lock.
</t>
<t>
   With shared locks there are two trust sets that affect a resource.
   The first trust set is created by access permissions.  Principals who
   are trusted, for example, may have permission to write to the
   resource.  Among those who have access permission to write to the
   resource, the set of principals who have taken out a shared lock also
   must trust each other, creating a (typically) smaller trust set
   within the access permission write set.
</t>
<t>
   Starting with every possible principal on the Internet, in most
   situations the vast majority of these principals will not have write
   access to a given resource.  Of the small number who do have write
   access, some principals may decide to guarantee their edits are free
   from overwrite conflicts by using exclusive write locks.  Others may
   decide they trust their collaborators will not overwrite their work
   (the potential set of collaborators being the set of principals who
   have write permission) and use a shared lock, which informs their
   collaborators that a principal may be working on the resource.
</t>
<t>
   The WebDAV extensions to HTTP do not need to provide all of the
   communications paths necessary for principals to coordinate their
   activities.  When using shared locks, principals may use any out of
   band communication channel to coordinate their work (e.g., face-to-face
   interaction, written notes, post-it notes on the screen,
   telephone conversation, Email, etc.)  The intent of a shared lock is
   to let collaborators know who else may be working on a resource.
</t>
<t>
   Shared locks are included because experience from web distributed
   authoring systems has indicated that exclusive locks are often too
   rigid.  An exclusive lock is used to enforce a particular editing
   process: take out an exclusive lock, read the resource, perform
   edits, write the resource, release the lock.  This editing process
   has the problem that locks are not always properly released, for
   example when a program crashes, or when a lock owner leaves without
   unlocking a resource.  While both timeouts and administrative action
   can be used to remove an offending lock, neither mechanism may be
   available when needed; the timeout may be long or the administrator
   may not be available.
</t>
</section>

<section title="Required Support">
<t>
   A WebDAV compliant server is not required to support locking in any
   form.  If the server does support locking it may choose to support
   any combination of exclusive and shared locks for any access types.
</t>
<t>
   The reason for this flexibility is that locking policy strikes to the
   very heart of the resource management and versioning systems employed
   by various storage repositories.  These repositories require control
   over what sort of locking will be made available.  For example, some
   repositories only support shared write locks while others only
   provide support for exclusive write locks while yet others use no
   locking at all.  As each system is sufficiently different to merit
   exclusion of certain locking features, this specification leaves
   locking as the sole axis of negotiation within WebDAV.
</t>
</section>

<section title="Lock Tokens">
<t>
   A lock token is a type of state token, represented as a URI, which
   identifies a particular lock.  A lock token is returned by every
   successful LOCK operation in the <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property in the
   response body, and can also be found through lock discovery on a
   resource.
</t>
<t>
   Lock token URIs MUST be unique across all resources for all time.
   This uniqueness constraint allows lock tokens to be submitted across
   resources and servers without fear of confusion.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_02" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.6.3">Section 6.3</a>: "... However resource are free to return any URI scheme so long
    as it meets the uniqueness requirements."
    <br/>
    This is technically correct, but it might also be useful to say that the scheme
    should make the URI  be readily recognizable as a *LOCK* state token in the
    event that other types of state tokens exist.  I mention this because we seem to
    have created the possibility of other types of state tokens.   -- Your call. :-)
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-24">
    Disagreement: any URI scheme can be used as a lock token. Specifications that
    define other types of state tokens will have to take care of distinguishing
    them inside an "If" header.
  </ed:item>
  <ed:resolution datetime="2004-05-22">
    No change.
  </ed:resolution>   
</ed:issue>
<t>
   This specification provides a lock token URI scheme called
   <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>"</ed:ins></ed:replace>opaquelocktoken<ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>"</ed:ins></ed:replace> that meets the uniqueness requirements.  However
   resources are free to return any URI scheme so long as it meets the
   uniqueness requirements.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_01" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.6.3">Section 6.3</a>: ""Having a lock token provides no special access rights..."
    <br/>
    I suggest that the phrase "owned by another party" be added in this first
    sentence to distinguish between owning and having.  It speaks of "having" in
    this sentence but not subsequently.   In fact "submitting" might be an even
    better word than having.
  </ed:item>
  <ed:resolution datetime="2004-05-24">
    Agreed, use "submitting".
  </ed:resolution>
</ed:issue>
<t>
   <ed:replace datetime="2004-05-24" ed:resolves="040_LOCK_ISSUES_01"><ed:del>Having</ed:del><ed:ins>Submitting</ed:ins></ed:replace> a lock token provides no special access rights. Anyone can
   find out anyone else's lock token by performing lock discovery.
   Locks MUST be enforced based upon whatever authentication mechanism
   is used by the server, not based on the secrecy of the token values.
</t>
</section>

<ed:replace ed:resolves="015_MOVE_SECTION_6.4.1_TO_APPX" datetime="2004-05-31"><ed:del> 
<section title="opaquelocktoken Lock Token URI Scheme">
<t>
   The opaquelocktoken URI scheme is designed to be unique across all
   resources for all time.  Due to this uniqueness quality, a client may
   submit an opaque lock token in an If header on a resource other than
   the one that returned it.
</t>
<t>
   All resources MUST recognize the opaquelocktoken scheme and, at
   minimum, recognize that the lock token does not refer to an
   outstanding lock on the resource.
</t>
<t>
   In order to guarantee uniqueness across all resources for all time
   the opaquelocktoken requires the use of the Universal Unique
   Identifier (UUID) mechanism, as described in <xref target="ISO-11578"/>.
</t>
<t>
   Opaquelocktoken generators, however, have a choice of how they create
   these tokens.  They can either generate a new UUID for every lock
   token they create or they can create a single UUID  and then add
   extension characters.  If the second method is selected then the
   program generating the extensions MUST guarantee that the same
   extension will never be used twice with the associated UUID.
</t>
<t>
   OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension]  ; The UUID
   production is the string representation of a UUID, as defined in
   <xref target="ISO-11578"/>. Note that white space (LWS) is not allowed between
   elements of this production.
</t>
<t>
   Extension = path  ; path is defined in <ed:replace datetime="2004-05-21" ed:resolves="updated-rfc2068"><ed:del> section 3.2.1 of RFC 2068
   <xref target="RFC2068"/></ed:del><ed:ins><xref target="RFC2396"/>, section 3.3.</ed:ins></ed:replace>
</t>

<section title="Node Field Generation Without the IEEE 802 Address">
<t>
   UUIDs, as defined in <xref target="ISO-11578"/>, contain a "node" field that
   contains one of the IEEE 802 addresses for the server machine.  As
   noted in <xref target="risks.connected.with.lock.tokens"/>, there are several security risks associated
   with exposing a machine's IEEE 802 address. This section provides an
   alternate mechanism for generating the "node" field of a UUID which
   does not employ an IEEE 802 address.  WebDAV servers MAY use this
   algorithm for creating the node field when generating UUIDs.  The
   text in this section is originally from an Internet-Draft by Paul
   Leach and Rich Salz, who are noted here to properly attribute their
   work.
</t>
<t>
   The ideal solution is to obtain a 47 bit cryptographic quality random
   number, and use it as the low 47 bits of the node ID, with the most
   significant bit of the first octet of the node ID set to 1.  This bit
   is the unicast/multicast bit, which will never be set in IEEE 802
   addresses obtained from network cards; hence, there can never be a
   conflict between UUIDs generated by machines with and without network
   cards.
</t>
<t>
   If a system does not have a primitive to generate cryptographic
   quality random numbers, then in most systems there are usually a
   fairly large number of sources of randomness available from which one
   can be generated. Such sources are system specific, but often
   include:
</t>
<t>
  <list style="symbols">
    <t>the percent of memory in use</t>
    <t>the size of main memory in bytes</t>
    <t>the amount of free main memory in bytes</t>
    <t>the size of the paging or swap file in bytes</t>
    <t>free bytes of paging or swap file</t>
    <t>the total size of user virtual address space in bytes</t>
    <t>the total available user address space bytes</t>
    <t>the size of boot disk drive in bytes</t>
    <t>the free disk space on boot drive in bytes</t>
    <t>the current time</t>
    <t>the amount of time since the system booted</t>
    <t>the individual sizes of files in various system directories</t>
    <t>the creation, last read, and modification times of files in
      various system directories</t>
    <t>the utilization factors of various system resources (heap, etc.)</t>
    <t>current mouse cursor position</t>
    <t>current caret position</t>
    <t>current number of running processes, threads</t>
    <t>handles or IDs of the desktop window and the active window</t>
    <t>the value of stack pointer of the caller</t>
    <t>the process and thread ID of caller</t>
    <t>various processor architecture specific performance counters
      (instructions executed, cache misses, TLB misses)</t>
  </list>
</t>
<t>
   (Note that it is precisely the above kinds of sources of randomness
   that are used to seed cryptographic quality random number generators
   on systems without special hardware for their construction.)
</t>
<t>
   In addition, items such as the computer's name and the name of the
   operating system, while not strictly speaking random, will help
   differentiate the results from those obtained by other systems.
</t>
<t>
   The exact algorithm to generate a node ID using these data is system
   specific, because both the data available and the functions to obtain
   them are often very system specific. However, assuming that one can
   concatenate all the values from the randomness sources into a buffer,
   and that a cryptographic hash function such as MD5 is available, then
   any 6 bytes of the MD5 hash of the buffer, with the multicast bit
   (the high bit of the first byte) set will be an appropriately random
   node ID.
</t>
<t>
   Other hash functions, such as SHA-1, can also be used. The only
   requirement is that the result be suitably random<ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:del> _</ed:del></ed:replace> in the sense that
   the outputs from a set uniformly distributed inputs are themselves
   uniformly distributed, and that a single bit change in the input can
   be expected to cause half of the output bits to change.
</t>
</section>
</section>
</ed:del></ed:replace>

<section title="Lock Capability Discovery">
<t>
   Since server lock support is optional, a client trying to lock a
   resource on a server can either try the lock and hope for the best,
   or perform some form of discovery to determine what lock capabilities
   the server supports.  This is known as lock capability discovery.
   Lock capability discovery differs from discovery of supported access
   control types, since there may be access control types without
   corresponding lock types.  A client can determine what lock types the
   server supports by retrieving the <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>supportedlock property.
</t>
<t>
   Any DAV compliant resource that supports the LOCK method MUST support
   the <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>supportedlock property.
</t>
</section>

<section title="Active Lock Discovery">
<t>
   If another principal locks a resource that a principal wishes to
   access, it is useful for the second principal to be able to find out
   who the first principal is.  For this purpose the <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery
   property is provided.  This property lists all outstanding locks,
   describes their type, and where available, provides their lock token.
</t>
<t>
   Any DAV compliant resource that supports the LOCK method MUST support
   the <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property.
</t>
</section>

<section title="Usage Considerations">
<t>
   Although the locking mechanisms specified here provide some help in
   preventing lost updates, they cannot guarantee that updates will
   never be lost.  Consider the following scenario:
</t>
<ed:replace datetime="2004-05-30" ed:resolves="edit"><ed:del>
<t>
   Two clients A and B are interested in editing the resource 'index.html'.
   Client A is an HTTP client rather than a WebDAV client,
   and so does not know how to perform locking.
</t>
<t>
   Client A doesn't lock the document, but does a GET and begins
   editing.
</t>
<t>
   Client B does LOCK, performs a GET and begins editing.
</t>
<t>
   Client B finishes editing, performs a PUT, then an UNLOCK.
</t>
<t>
   Client A performs a PUT, overwriting and losing all of B's changes.
</t>
</ed:del><ed:ins>
<t><list style="symbols">
<t>
   Two clients A and B are interested in editing the resource 'index.html'.
   Client A is an HTTP client rather than a WebDAV client,
   and so does not know how to perform locking.
</t>
<t>
   Client A doesn't lock the document, but does a GET and begins
   editing.
</t>
<t>
   Client B does LOCK, performs a GET and begins editing.
</t>
<t>
   Client B finishes editing, performs a PUT, then an UNLOCK.
</t>
<t>
   Client A performs a PUT, overwriting and losing all of B's changes.
</t>
</list></t>
</ed:ins></ed:replace>
<t>
   There are several reasons why the WebDAV protocol itself cannot
   prevent this situation.  First, it cannot force all clients to use
   locking because it must be compatible with HTTP clients that do not
   comprehend locking.  Second, it cannot require servers to support
   locking because of the variety of repository implementations, some of
   which rely on reservations and merging rather than on locking.
   Finally, being stateless, it cannot enforce a sequence of operations
   like LOCK / GET / PUT / UNLOCK.
</t>
<t>
   WebDAV servers that support locking can reduce the likelihood that
   clients will accidentally overwrite each other's changes by requiring
   clients to lock resources before modifying them.  Such servers would
   effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying
   resources.
</t>
<t>
   WebDAV clients can be good citizens by using a lock / retrieve /
   write /unlock sequence of operations (at least by default) whenever
   they interact with a WebDAV server that supports locking.
</t>
<t>
   HTTP 1.1 clients can be good citizens, avoiding overwriting other
   clients' changes, by using entity tags in If-Match headers with any
   requests that would modify resources.
</t>
<t>
   Information managers may attempt to prevent overwrites by
   implementing client-side procedures requiring locking before
   modifying WebDAV resources.
</t>
</section>
</section>

<section title="Write Lock">
<t>
   This section describes the semantics specific to the write lock type.
   The write lock is a specific instance of a lock type, and is the only
   lock type described in this specification.
</t>

<section title="Methods Restricted by Write Locks">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_03" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.7.1">Section 7.1</a> Write lock.
    <br/>
    I believe this definition of a write lock is not right... or not complete...
    judging from what I read elsewhere.  I believe one can do these operations
    without a write lock... as long as someone else doesn't have a write lock on the
    resources effected. I also believe it doesn't prevent LOCK requests in the case of shared locks.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-24">
    Clarify as part of rewriting the general semantics. The point about shared locks
    is correct, though.
  </ed:item>
</ed:issue>
<t>
   A write lock MUST prevent a principal without the lock from
   successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE,
   DELETE, or MKCOL on the locked resource.  All other current methods,
   GET in particular, function independently of the lock.
</t>
<t>
   Note, however, that as new methods are created it will be necessary
   to specify how they interact with a write lock.
</t>
</section>

<section title="Write Locks and Lock Tokens">
<t>
   A successful request for an exclusive or shared write lock MUST
   result in the generation of a unique lock token associated with the
   requesting principal.  Thus if five principals have a shared write
   lock on the same resource there will be five lock tokens, one for
   each principal.
</t>
</section>

<section title="Write Locks and Properties">
<t>
   While those without a write lock may not alter a property on a
   resource it is still possible for the values of live properties to
   change, even while locked, due to the requirements of their schemas.
   Only dead properties and live properties defined to respect locks are
   guaranteed not to change while write locked.
</t>
</section>

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="022_COPY_OVERWRITE_LOCK_NULL" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1998OctDec/0244.html">
  <ed:item entered-by="jdavis@parc.xerox.com" date="1998-11-29">
  	If URL Ub is locked, creating a lock-null resource, then if a COPY is performed listing Ub as the destination, COPY will remove the lock-null resource, removing the lock, then perform the copy.  A note needs to be added stating that the delete performed by the Overwrite header is atomic with the rest of the operation.
  </ed:item>
  <ed:resolution datetime="2004-05-22">
    See <a href="#rfc.issue.080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC">080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC</a>
  </ed:resolution>
</ed:issue>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="043_NULL_LOCK_SLASH_URL" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999JulSep/0039.html">
  <ed:item entered-by="wiggs@xythos.com" date="1999-07-23">
    If a URL ending in a slash is null locked, is it legal to do a PUT to it? That is, does the URL ending in slash set the resource type to a collection, or does the first PUT/MKCOL set the resource to a ordinary, or collection resource.
  </ed:item>
  <ed:resolution datetime="2004-05-22">
    See <a href="#rfc.issue.080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC">080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC</a>
  </ed:resolution>
</ed:issue>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="077_LOCK_NULL_STATUS_CREATION" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001AprJun/0267.html">
  <ed:item entered-by="lisa@xythos.com" datetime="2001-06-14">
    What status code should be returned when a lock null resource is created -
    200 OK or 201 Created? A related issue is what status code should be
    returned by a PUT or MKCOL on a lock-null resource? MKCOL is defined to be
    201, PUT could be 200 or 201 (201 seems like a slightly better choice).
  </ed:item>
  <ed:resolution datetime="2004-05-22">
    Resolved via the proposal to remove LNR and replace them with ordinary
    resources and by the following wording: <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0129.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0129.html</a>.
    See <a href="#rfc.issue.080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC">080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC</a>
  </ed:resolution>
</ed:issue>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC" type="change" status="closed">
  <ed:item>
  	Proposal to remove lock null resources from the spec until we are motivated
    to have them or something equivalent.  In the meantime, keep the spec silent
    on the topic in order to avoid precluding LNR or the equivalent in a future
    version of WebDAV.
  </ed:item>
  <ed:resolution datetime="2004-05-25">
    LNRs removed. See discussions preceding conclusion:
    <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0128.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0128.html</a> and
    <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0107.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0107.html</a>. 
    Closes <a href="#rfc.issue.022_COPY_OVERWRITE_LOCK_NULL">022_COPY_OVERWRITE_LOCK_NULL</a>,
    <a href="#rfc.issue.043_NULL_LOCK_SLASH_URL">043_NULL_LOCK_SLASH_URL</a>,
    <a href="#rfc.issue.077_LOCK_NULL_STATUS_CREATION">077_LOCK_NULL_STATUS_CREATION</a>.
  </ed:resolution>
</ed:issue>
<ed:replace datetime="2004-05-25" ed:resolves="080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC"><ed:del>
<section title="Write Locks and Null Resources">
<t>
   It is possible to assert a write lock on a null resource in order to
   lock the name.
</t>
<t>
   A write locked null resource, referred to as a lock-null resource,
   MUST respond with a 404 (Not Found) or 405 (Method Not Allowed) to
   any HTTP/1.1 or DAV methods except for PUT, MKCOL, OPTIONS, PROPFIND,
   LOCK, and UNLOCK.  A lock-null resource MUST appear as a member of
   its parent collection.  Additionally the lock-null resource MUST have
   defined on it all mandatory DAV properties.  Most of these
   properties, such as all the get* properties, will have no value as a
   lock-null resource does not support the GET method.  Lock-Null
   resources MUST have defined values for lockdiscovery and
   supportedlock properties.
</t>
<t>
   Until a method such as PUT or MKCOL is successfully executed on the
   lock-null resource the resource MUST stay in the lock-null state.
   However, once a PUT or MKCOL is successfully executed on a lock-null
   resource the resource ceases to be in the lock-null state.
</t>
<t>
   If the resource is unlocked, for any reason, without a PUT, MKCOL, or
   similar method having been successfully executed upon it then the
   resource MUST return to the null state.
</t>
</section>
</ed:del></ed:replace>

<section title="Write Locks and Collections" anchor="write.locks.and.collections">
<t>
   A write lock on a collection, whether created by a "Depth: 0" or
   "Depth: infinity" lock request, prevents the addition or removal of
   member URIs of the collection by non-lock owners.  As a consequence,
   when a principal issues a PUT or POST request to create a new
   resource under a URI which needs to be an internal member of a write
   locked collection to maintain HTTP namespace consistency, or issues a
   DELETE to remove a resource which has a URI which is an existing
   internal member URI of a write locked collection, this request MUST
   fail if the principal does not have a write lock on the collection.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_04" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.7.5">Section 7.5</a> Write Locks and Collections.
    <br/>
    It says that if members are locked in a conflicting manner, then their
    collection can't be locked.  That seems ambiguously safe to say, but I suspect
    that text should mention depth since if the parent lock request is depth 0, I
    don't think we let the members lock state effect the success of the LOCK
    request.  The possible exception is what we said about protecting a URI that was
    used to perform a lock (of a member of the collection).  I'm not sure what we'd
    like to say for that.  In the advanced collection meetings we refered to these
    being "protected" and avoided speaking about "lock"ing the URI.  This creates an
    odd situation though.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-05-24">
    Clarify that this only applies to the attempt to depth-infinity lock
    the collection.
  </ed:item>
</ed:issue>
<t>
   However, if a write lock request is issued to a collection containing
   member URIs identifying resources that are currently locked in a
   manner which conflicts with the write lock, the request MUST fail
   with a 423 (Locked) status code.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="053_LOCK_INHERITANCE" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999OctDec/0250.html">
  <ed:item entered-by="jrd3@alum.mit.edu" date="1999-11-26">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.7.5">Section 7.5</a>
    states, "If a lock owner causes the URI of a resource to be added as an
    internal member URI of a locked collection then the new resource MUST be
    automatically added to the lock." However, though this is the intent, the
    specification does not explicitly state that this behavior only applies to
    depth infinity locked collections.  The words "Depth infinity" should be
    added before the word "locked" in this sentence.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Clarify as part of integrating GULP.
  </ed:item>  
</ed:issue>
<t>
   If a lock owner causes the URI of a resource to be added as an
   internal member URI of a locked collection then the new resource MUST
   be automatically added to the lock.  This is the only mechanism that
   allows a resource to be added to a write lock.  Thus, for example, if
   the collection /a/b/ is write locked and the resource /c is moved to
   /a/b/c then resource /a/b/c will be added to the write lock.
</t>
</section>

<section title="Write Locks and the If Request Header" anchor="write.locks.and.the.if.request.header">
<t>
   If a user agent is not required to have knowledge about a lock when
   requesting an operation on a locked resource, the following scenario
   might occur.  Program A, run by User A, takes out a write lock on a
   resource.  Program B, also run by User A, has no knowledge of the
   lock taken out by Program A, yet performs a PUT to the locked
   resource.  In this scenario, the PUT succeeds because locks are
   associated with a principal, not a program, and thus program B,
   because it is acting with principal A's credential, is allowed to
   perform the PUT.  However, had program B known about the lock, it
   would not have overwritten the resource, preferring instead to
   present a dialog box describing the conflict to the user.  Due to
   this scenario, a mechanism is needed to prevent different programs
   from accidentally ignoring locks taken out by other programs with the
   same authorization.
</t>
<t>
   In order to prevent these collisions a lock token MUST be submitted
   by an authorized principal in the If header for all locked resources
   that a method may interact with or the method MUST fail.  For
   example, if a resource is to be moved and both the source and
   destination are locked then two lock tokens must be submitted, one
   for the source and the other for the destination.
</t>

<section title="Example - Write Lock">
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace datetime="2004-05-24" ed:resolves="rfc2606-compliance"><ed:del>
<artwork>
   COPY /~fielding/index.html HTTP/1.1
   Host: www.ics.uci.edu
   Destination: http://www.ics.uci.edu/users/f/fielding/index.html
   If: &lt;http://www.ics.uci.edu/users/f/fielding/index.html&gt;
       (&lt;opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf6&gt;)
</artwork>
</ed:del><ed:ins>
<artwork>
   COPY /~fielding/index.html HTTP/1.1
   Host: example.com
   Destination: http://example.com/users/f/fielding/index.html
   If: &lt;http://example.com/users/f/fielding/index.html&gt;
       (&lt;opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf6&gt;)
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<artwork>
   HTTP/1.1 204 No Content
</artwork></figure>
<t>
   In this example, even though both the source and destination are
   locked, only one lock token must be submitted, for the lock on the
   destination.  This is because the source resource is not modified by
   a COPY, and hence unaffected by the write lock. In this example, user
   agent authentication has previously occurred via a mechanism outside
   the scope of the HTTP protocol, in the underlying transport layer.
</t>
</section>
</section>

<section title="Write Locks and COPY/MOVE">

<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="040_LOCK_ISSUES_05" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0246.html">
  <ed:item entered-by="ccjason@us.ibm.com" date="1999-06-07">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.7.7">7.7</a> Write Locks and COPY/MOVE
    <br/>
    It says that a lock doesn't move with a moved resource.  Of course if the lock
    is on the resource, not the URI, it should move with the resource.   But then we
    have the caveat that we are also protecting the LOCK'd URI.   I think the rule
    should be that if we submit the locktoken with the MOVE request, we are allowed
    to have the LOCK move with the resource and the lock will now protect a
    different URI.  Also, ALL locks in the subtree must be submitted or the MOVE
    must fail because otherwise it would break our URI protection rule.
  </ed:item>
  <ed:resolution datetime="2004-05-30">
    No change: LOCKs are lost then the locked resource is moved. Will also
    be clearer once GULP is incorporated.
  </ed:resolution>
</ed:issue>
<t>
   A COPY method invocation MUST NOT duplicate any write locks active on
   the source.  However, as previously noted, if the COPY copies the
   resource into a collection that is locked with "Depth: infinity",
   then the resource will be added to the lock.
</t>
<t>
   A successful MOVE request on a write locked resource MUST NOT move
   the write lock with the resource. However, the resource is subject to
   being added to an existing lock at the destination, as specified in
   <xref target="write.locks.and.collections"/>. For example, if the MOVE makes the resource a child of a
   collection that is locked with "Depth: infinity", then the resource
   will be added to that collection's lock. Additionally, if a resource
   locked with "Depth: infinity" is moved to a destination that is
   within the scope of the same lock (e.g., within the namespace tree
   covered by the lock), the moved resource will again be a added to the
   lock. In both these examples, as specified in <xref target="write.locks.and.the.if.request.header"/>, an If
   header must be submitted containing a lock token for both the source
   and destination.
</t>
</section>

<section title="Refreshing Write Locks">
<t>
   A client MUST NOT submit the same write lock request twice.  Note
   that a client is always aware it is resubmitting the same lock
   request because it must include the lock token in the If header in
   order to make the request for a resource that is already locked.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="060_LOCK_REFRESH_BODY" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2000JulSep/0039.html">
  <ed:item entered-by="rickard.falk@excosoft.se" date="2000-07-11">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.7.8">Section 7.8</a>
    of RFC 2518 indicates that clients may submit a lock refresh without a body.
    However, it implies that clients could submit a lock refresh with a body.
    Server implementations have been disallowing a lock refresh with a body. It
    might make sense to codify this practice, and disallow submission of a body
    on a lock refresh.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-25">
    Clarify that LOCK refresh MUST NOT have a request body. Also clarify
    Lock-Token header vs If header.
  </ed:item>  
</ed:issue>
<t>
   However, a client may submit a LOCK method with an If header but
   without a body.  This form of LOCK MUST only be used to "refresh" a
   lock.  Meaning, at minimum, that any timers associated with the lock
   MUST be re-set.
</t>
<t>
   A server may return a Timeout header with a lock refresh that is
   different than the Timeout header returned when the lock was
   originally requested.  Additionally clients may submit Timeout
   headers of arbitrary value with their lock refresh requests.
   Servers, as always, may ignore Timeout headers submitted by the
   client.
</t>
<t>
   If an error is received in response to a refresh LOCK request the
   client SHOULD assume that the lock was not refreshed.
</t>
</section>
</section>

<section title="HTTP Methods for Distributed Authoring">
<section title="LOCK Method" anchor="METHOD_LOCK">
<iref item="LOCK method" primary="true"/>
<iref item="Methods" subitem="LOCK" primary="true"/>
<t>
   The following sections describe the LOCK method, which is used to
   take out a lock of any access type.  These sections on the LOCK
   method describe only those semantics that are specific to the LOCK
   method and are independent of the access type of the lock being
   requested.
</t><t>
   Any resource which supports the LOCK method MUST, at minimum, support
   the XML request and response formats defined herein.
</t>

<section title="Operation">
<ed:replace datetime="2004-05-25" ed:resolves="080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC"><ed:ins>
<t>
  <cref source="reschke">Make sure updated method description discusses
  applying LOCK to null resources.</cref>
</t>
</ed:ins></ed:replace>
<t>
   A LOCK method invocation creates the lock specified by the lockinfo
   XML element on the <ed:replace ed:resolves="import-gulp" datetime="2004-05-30"><ed:ins>resource identified by the </ed:ins></ed:replace>Request-URI.  Lock method requests SHOULD have a
   XML request body which contains an owner XML element for this lock
   request, unless this is a refresh request. The LOCK request may have
   a Timeout header.
</t><t>
   Clients MUST assume that locks may arbitrarily disappear at any time,
   regardless of the value given in the Timeout header.  The Timeout
   header only indicates the behavior of the server if "extraordinary"
   circumstances do not occur.  For example, an administrator may remove
   a lock at any time or the system may crash in such a way that it
   loses the record of the lock's existence. The response MUST contain
   the value of the <ed:replace datetime="2004-05-26" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property in a prop XML element.
</t><t>
   In order to indicate the lock token associated with a newly created
   lock, a Lock-Token response header MUST be included in the response
   for every successful LOCK request for a new lock.  Note that the
   Lock-Token header would not be returned in the response for a
   successful refresh LOCK request because a new lock was not created.
</t>
</section>

<section title="The Effect of Locks on Properties and Collections">
<t>
   The scope of a lock is the entire state of the resource, including
   its body and associated properties.  As a result, a lock on a
   resource MUST also lock the resource's properties.
</t><t>
   For collections, a lock also affects the ability to add or remove
   members.  The nature of the effect depends upon the type of access
   control involved.
</t>
</section>

<section title="Locking Replicated Resources">
<t>
   A resource may be made available through more than one URI. However
   locks apply to resources, not URIs. Therefore a LOCK request on a
   resource MUST NOT succeed if can not be honored by all the URIs
   through which the resource is addressable.
</t>
</section>

<section title="Depth and Locking">
<t>
   The Depth header may be used with the LOCK method.  Values other than
   0 or infinity MUST NOT be used with the Depth header on a LOCK
   method.  All resources that support the LOCK method MUST support the
   Depth header.
</t><t>
   A Depth header of value 0 means to just lock the resource specified
   by the Request-URI.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="037_DEEP_LOCK_ERROR_STATUS" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1999AprJun/0196.html">
  <ed:item entered-by="wiggs@wiggenout.com" date="1999-05-18">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.8.10.4">Section 8.10.4</a>
    states that if a lock cannot be granted to all resources in a hierarchy, a
    409 status response must be issued.  Yet, the example in
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.8.10.10">section 8.10.10</a> which demonstrates this uses a 207.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-24">
    Comment: 207 is correct, fix the bad spec text.
  </ed:item>
  <ed:resolution datetime="2004-05-22">
    Done.
  </ed:resolution>
</ed:issue>
<t>
   If the Depth header is set to infinity then the resource specified in
   the Request-URI along with all its internal members, all the way down
   the hierarchy, are to be locked.  A successful result MUST return a
   single lock token which represents all the resources that have been
   locked.  If an UNLOCK is successfully executed on this token, all
   associated resources are unlocked.  If the lock cannot be granted to
   all resources, a <ed:replace datetime="2004-05-22" ed:resolves="037_DEEP_LOCK_ERROR_STATUS"><ed:del>409 (Conflict)</ed:del><ed:ins>207 (Multistatus)</ed:ins></ed:replace> status code MUST be returned with a
   response entity body containing a multistatus XML element describing
   which resource(s) prevented the lock from being granted.  Hence,
   partial success is not an option.  Either the entire hierarchy is
   locked or no resources are locked.
</t><t>
   If no Depth header is submitted on a LOCK request then the request
   MUST act as if a "Depth:infinity" had been submitted.
</t>
</section>

<section title="Interaction with other Methods">
<t>
   The interaction of a LOCK with various methods is dependent upon the
   lock type.  However, independent of lock type, a successful DELETE of
   a resource MUST cause all of its locks to be removed.
</t>
</section>

<section title="Lock Compatibility Table">
<texttable>
<preamble>
   The table below describes the behavior that occurs when a lock
   request is made on a resource.
</preamble>
<ttcol width="40%">Current lock state / Lock request</ttcol><ttcol>Shared Lock</ttcol><ttcol>Exclusive Lock</ttcol>
<c>None</c><c>True</c><c>True</c>
<c>Shared Lock</c><c>True</c><c>False</c>
<c>Exclusive Lock</c><c>False</c><c>False*</c>
<postamble>
   Legend: True = lock may be granted.  False = lock MUST NOT be
   granted. *=It is illegal for a principal to request the same lock
   twice.
</postamble>
</texttable>
<t>
   The current lock state of a resource is given in the leftmost column,
   and lock requests are listed in the first row.  The intersection of a
   row and column gives the result of a lock request.  For example, if a
   shared lock is held on a resource, and an exclusive lock is
   requested, the table entry is "false", indicating the lock must not
   be granted.
</t>
</section>

<section title="Status Codes">
<t>
   200 (OK) - The lock request succeeded and the value of the
   <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property is included in the body.
</t><t>
   412 (Precondition Failed) - The included lock token was not
   enforceable on this resource or the server could not satisfy the
   request in the lockinfo XML element.
</t><t>
   423 (Locked) - The resource is locked, so the method has been
   rejected.
</t>
</section>

<section title="Example - Simple Lock Request">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="039_MISSING_LOCK_TOKEN" type="change" status="closed" href="http://dav.lyra.org/pipermail/dav-dev/1999-June/000277.html">
  <ed:item date="1999-06-15">
    Keith Wannamaker: <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.8.10.1">Section 8.10.1</a>
    explicitly states that the response from a successful lock request MUST
    include the Lock-Token header, yet the examples in 8.10.8, 8.10.9, and 8.10.10
    aren't compliant with this requirement, and should be updated.
  </ed:item>
  <ed:resolution datetime="2004-05-21">
    Make obvious editing changes to the examples: <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0229.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0229.html</a>
    Note that this only applies to the example for a successful lock
    creation, not for refreshes.
  </ed:resolution>
</ed:issue>
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace datetime="2004-05-22" ed:resolves="rfc2606-compliance"><ed:del>
<artwork>
   LOCK /workspace/webdav/proposal.doc HTTP/1.1
   Host: webdav.sb.aol.com
   Timeout: Infinite, Second-4100000000
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx
   Authorization: Digest username="ejw",
      realm="ejw@webdav.sb.aol.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:lockinfo xmlns:D='DAV:'&gt;
     &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
     &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
     &lt;D:owner&gt;
          &lt;D:href&gt;http://www.ics.uci.edu/~ejw/contact.html&lt;/D:href&gt;
     &lt;/D:owner&gt;
   &lt;/D:lockinfo&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   LOCK /workspace/webdav/proposal.doc HTTP/1.1
   Host: example.com
   Timeout: Infinite, Second-4100000000
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx
   Authorization: Digest username="ejw",
      realm="ejw@example.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:lockinfo xmlns:D='DAV:'&gt;
     &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
     &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
     &lt;D:owner&gt;
       &lt;D:href&gt;http://example.org/~ejw/contact.html&lt;/D:href&gt;
     &lt;/D:owner&gt;
   &lt;/D:lockinfo&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<ed:replace datetime="2004-05-21" ed:resolves="039_MISSING_LOCK_TOKEN">
<ed:resolves>rfc2606-compliance</ed:resolves>
<ed:resolves>089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK</ed:resolves>
<ed:del>
<artwork>
   HTTP/1.1 200 OK
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:prop xmlns:D="DAV:"&gt;
     &lt;D:lockdiscovery&gt;
          &lt;D:activelock&gt;
               &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
               &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
               &lt;D:depth&gt;Infinity&lt;/D:depth&gt;
               &lt;D:owner&gt;
                    &lt;D:href&gt;
                         http://www.ics.uci.edu/~ejw/contact.html
                    &lt;/D:href&gt;
               &lt;/D:owner&gt;
               &lt;D:timeout&gt;Second-604800&lt;/D:timeout&gt;
               &lt;D:locktoken&gt;
                    &lt;D:href&gt;
               opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4
                    &lt;/D:href&gt;
               &lt;/D:locktoken&gt;
          &lt;/D:activelock&gt;
     &lt;/D:lockdiscovery&gt;
   &lt;/D:prop&gt;
</artwork>
</ed:del>
<ed:ins>
<artwork>
   HTTP/1.1 200 OK
   Lock-Token: &lt;opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4>
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:prop xmlns:D="DAV:"&gt;
     &lt;D:lockdiscovery&gt;
       &lt;D:activelock&gt;
         &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
         &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
         &lt;D:depth&gt;Infinity&lt;/D:depth&gt;
         &lt;D:owner&gt;
           &lt;D:href
   &gt;http://example.org/~ejw/contact.html&lt;/D:href&gt;
         &lt;/D:owner&gt;
         &lt;D:timeout&gt;Second-604800&lt;/D:timeout&gt;
         &lt;D:locktoken&gt;
           &lt;D:href
   &gt;opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4&lt;/D:href&gt;
         &lt;/D:locktoken&gt;
         &lt;D:lockroot&gt;
           &lt;D:href
   &gt;http://example.com/workspace/webdav/proposal.doc&lt;/D:href&gt;
         &lt;/D:lockroot&gt;
       &lt;/D:activelock&gt;
     &lt;/D:lockdiscovery&gt;
   &lt;/D:prop&gt;
</artwork>
</ed:ins>
</ed:replace>
</figure>
<t>
   This example shows the successful creation of an exclusive write lock
   on resource <ed:replace datetime="2004-05-22" ed:resolves="rfc2606-compliance"><ed:del>http://webdav.sb.aol.com/workspace/webdav/proposal.doc</ed:del>
   <ed:ins>http://example.com/workspace/webdav/proposal.doc</ed:ins></ed:replace>.
   The resource <ed:replace datetime="2004-05-22" ed:resolves="rfc2606-compliance"><ed:del>http://www.ics.uci.edu/~ejw/contact.html</ed:del>
   <ed:ins>http:/example.org/~ejw/contact.html</ed:ins></ed:replace> contains
   contact information for the owner of the lock.  The server has an
   activity-based timeout policy in place on this resource, which causes
   the lock to automatically be removed after 1 week (604800 seconds).
   Note that the nonce, response, and opaque fields have not been
   calculated in the Authorization request header.
</t>
</section>

<section title="Example - Refreshing a Write Lock">
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace datetime="2004-05-22" ed:resolves="rfc2606-compliance"><ed:del>
<artwork>
   LOCK /workspace/webdav/proposal.doc HTTP/1.1
   Host: webdav.sb.aol.com
   Timeout: Infinite, Second-4100000000
   If: (&lt;opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4&gt;)
   Authorization: Digest username="ejw",
      realm="ejw@webdav.sb.aol.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."
</artwork>
</ed:del><ed:ins>
<artwork>
   LOCK /workspace/webdav/proposal.doc HTTP/1.1
   Host: example.com
   Timeout: Infinite, Second-4100000000
   If: (&lt;opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4&gt;)
   Authorization: Digest username="ejw",
      realm="ejw@example.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<ed:replace datetime="2004-05-22" ed:resolves="rfc2606-compliance">
<ed:resolves>089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK</ed:resolves>
<ed:del>
<artwork>
   HTTP/1.1 200 OK
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:prop xmlns:D="DAV:"&gt;
     &lt;D:lockdiscovery&gt;
          &lt;D:activelock&gt;
               &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
               &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
               &lt;D:depth&gt;Infinity&lt;/D:depth&gt;
               &lt;D:owner&gt;
                    &lt;D:href&gt;
                    http://www.ics.uci.edu/~ejw/contact.html
                    &lt;/D:href&gt;
               &lt;/D:owner&gt;
               &lt;D:timeout&gt;Second-604800&lt;/D:timeout&gt;
               &lt;D:locktoken&gt;
                    &lt;D:href&gt;
               opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4
                    &lt;/D:href&gt;
               &lt;/D:locktoken&gt;
          &lt;/D:activelock&gt;
     &lt;/D:lockdiscovery&gt;
   &lt;/D:prop&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   HTTP/1.1 200 OK
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:prop xmlns:D="DAV:"&gt;
     &lt;D:lockdiscovery&gt;
       &lt;D:activelock&gt;
         &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
         &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
         &lt;D:depth&gt;Infinity&lt;/D:depth&gt;
         &lt;D:owner&gt;
           &lt;D:href
   &gt;http://example.org/~ejw/contact.html&lt;/D:href&gt;
         &lt;/D:owner&gt;
         &lt;D:timeout&gt;Second-604800&lt;/D:timeout&gt;
         &lt;D:locktoken&gt;
           &lt;D:href
   &gt;opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4&lt;/D:href&gt;
         &lt;/D:locktoken&gt;
         &lt;D:lockroot&gt;
           &lt;D:href
   &gt;http://example.com/workspace/webdav/proposal.doc&lt;/D:href&gt;
         &lt;/D:lockroot&gt;
       &lt;/D:activelock&gt;
     &lt;/D:lockdiscovery&gt;
   &lt;/D:prop&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<t>
   This request would refresh the lock, resetting any time outs.  Notice
   that the client asked for an infinite time out but the server choose
   to ignore the request. In this example, the nonce, response, and
   opaque fields have not been calculated in the Authorization request
   header.
</t>
</section>

<section title="Example - Multi-Resource Lock Request">
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace ed:datetime="2004-05-24" ed:resolves="rfc2606-compliance"><ed:del>
<artwork>
   LOCK /webdav/ HTTP/1.1
   Host: webdav.sb.aol.com
   Timeout: Infinite, Second-4100000000
   Depth: infinity
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx
   Authorization: Digest username="ejw",
      realm="ejw@webdav.sb.aol.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:lockinfo xmlns:D="DAV:"&gt;
     &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
     &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
     &lt;D:owner&gt;
          &lt;D:href&gt;http://www.ics.uci.edu/~ejw/contact.html&lt;/D:href&gt;
     &lt;/D:owner&gt;
   &lt;/D:lockinfo&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   LOCK /webdav/ HTTP/1.1
   Host: example.com
   Timeout: Infinite, Second-4100000000
   Depth: infinity
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx
   Authorization: Digest username="ejw",
      realm="ejw@example.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:lockinfo xmlns:D="DAV:"&gt;
     &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
     &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
     &lt;D:owner&gt;
       &lt;D:href&gt;http://example.org/~ejw/contact.html&lt;/D:href&gt;
     &lt;/D:owner&gt;
   &lt;/D:lockinfo&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<ed:replace ed:datetime="2004-05-24" ed:resolves="rfc2606-compliance"><ed:del>
<artwork>
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:multistatus xmlns:D="DAV:"&gt;
     &lt;D:response&gt;
          &lt;D:href&gt;http://webdav.sb.aol.com/webdav/secret&lt;/D:href&gt;
          &lt;D:status&gt;HTTP/1.1 403 Forbidden&lt;/D:status&gt;
     &lt;/D:response&gt;
     &lt;D:response&gt;
          &lt;D:href&gt;http://webdav.sb.aol.com/webdav/&lt;/D:href&gt;
          &lt;D:propstat&gt;
               &lt;D:prop&gt;&lt;D:lockdiscovery/&gt;&lt;/D:prop&gt;
               &lt;D:status&gt;HTTP/1.1 424 Failed Dependency&lt;/D:status&gt;
          &lt;/D:propstat&gt;
     &lt;/D:response&gt;
   &lt;/D:multistatus&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:multistatus xmlns:D="DAV:"&gt;
     &lt;D:response&gt;
        &lt;D:href&gt;/webdav/secret&lt;/D:href&gt;
        &lt;D:status&gt;HTTP/1.1 403 Forbidden&lt;/D:status&gt;
     &lt;/D:response&gt;
     &lt;D:response&gt;
        &lt;D:href&gt;/webdav/&lt;/D:href&gt;
        &lt;D:propstat&gt;
          &lt;D:prop&gt;&lt;D:lockdiscovery/&gt;&lt;/D:prop&gt;
          &lt;D:status&gt;HTTP/1.1 424 Failed Dependency&lt;/D:status&gt;
        &lt;/D:propstat&gt;
     &lt;/D:response&gt;
   &lt;/D:multistatus&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<t>
   This example shows a request for an exclusive write lock on a
   collection and all its children.  In this request, the client has
   specified that it desires an infinite length lock, if available,
   otherwise a timeout of 4.1 billion seconds, if available. The request
   entity body contains the contact information for the principal taking
   out the lock, in this case a web page URL.
</t><t>
   The error is a 403 (Forbidden) response on the resource
   http://<ed:replace ed:datetime="2004-05-24" ed:resolves="rfc2606-compliance"><ed:del>webdav.sb.aol</ed:del><ed:ins>example</ed:ins></ed:replace>.com/webdav/secret.  Because this resource could
   not be locked, none of the resources were locked.  Note also that the
   <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property for the Request-URI has been included as
   required.  In this example the <ed:replace datetime="2004-05-25" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property is empty which
   means that there are no outstanding locks on the resource.
</t><t>
   In this example, the nonce, response, and opaque fields have not been
   calculated in the Authorization request header.
</t>
</section>
</section>

<section title="UNLOCK Method" anchor="METHOD_UNLOCK">
<iref item="UNLOCK method" primary="true"/>
<iref item="Methods" subitem="UNLOCK" primary="true"/>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="065_UNLOCK_WHAT_URL" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0086.html">
  <ed:item entered-by="Juergen.Pill@softwareag.com" datetime="2001-03-01">
    What do you return if the unlock request specifies a URL on which the lock
    does not reside?  What if it's on a URL that is locked by the lock, but
    it's not the resource where the lock is rooted?
  </ed:item>
  <ed:item>
    <i>Resolution (as of May 31, 2004) from RFC2518 issues list:</i>
    Resolved that you can specify any URL locked by the lock you want to unlock.
    (<a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0027.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0027.html</a>)
    We should resolve the issue of UNLOCK'ing other URLs in a few days.
  </ed:item>
  <ed:resolution datetime="2004-05-31">
    RFC2518bis-05 and GULP 5.6 agree that the resource identified by the
    request URL must be directly locked.    
  </ed:resolution>
</ed:issue>
<t>
   The UNLOCK method removes the lock identified by the lock token in
   the Lock-Token request header from the <ed:replace ed:resolves="import-gulp" datetime="2004-05-30"><ed:ins>resource identified by the </ed:ins></ed:replace>Request-URI, and all other
   resources included in the lock.  
   <ed:replace ed:resolves="065_UNLOCK_WHAT_URL" datetime="2004-05-31"><ed:ins>
   The Request-URI MUST identify the resource that is directly locked by that lock.
   </ed:ins></ed:replace>
   If all resources which have been
   locked under the submitted lock token can not be unlocked then the
   UNLOCK request MUST fail.
</t><t>
   Any DAV compliant resource which supports the LOCK method MUST
   support the UNLOCK method.
</t>

<section title="Example - UNLOCK">
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace ed:datetime="2004-05-24" ed:resolves="rfc2606-compliance"><ed:del>
<artwork>
   UNLOCK /workspace/webdav/info.doc HTTP/1.1
   Host: webdav.sb.aol.com
   Lock-Token: &lt;opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7&gt;
   Authorization: Digest username="ejw",
      realm="ejw@webdav.sb.aol.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."
</artwork>
</ed:del><ed:ins>
<artwork>
   UNLOCK /workspace/webdav/info.doc HTTP/1.1
   Host: example.com
   Lock-Token: &lt;opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7&gt;
   Authorization: Digest username="ejw",
      realm="ejw@example.com", nonce="...",
      uri="/workspace/webdav/proposal.doc",
      response="...", opaque="..."
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<artwork>
   HTTP/1.1 204 No Content
</artwork></figure>
<t>
   In this example, the lock identified by the lock token
   "opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is
   successfully removed from the resource
   http://<ed:replace ed:datetime="2004-05-24" ed:resolves="rfc2606-compliance"><ed:del>webdav.sb.aol</ed:del><ed:ins>example</ed:ins></ed:replace>.com/workspace/webdav/info.doc.  If this lock
   included more than just one resource, the lock is removed from all
   resources included in the lock.  The 204 (No Content) status code is
   used instead of 200 (OK) because there is no response entity body.
</t><t>
   In this example, the nonce, response, and opaque fields have not been
   calculated in the Authorization request header.
</t>
</section>
</section>
</section>

<section title="HTTP Headers for Distributed Authoring" anchor="http.headers.for.distributed.authoring">

<ed:replace datetime="2004-05-31" ed:resolves="edit"><ed:del>
<section title="DAV Header" anchor="HEADER_DAV">
<t>
  <cref source="reschke">Add description of compliance class "2".</cref>
</t>
</section>
</ed:del></ed:replace>

<section title="Depth Header" anchor="HEADER_Depth">
<t>
  <cref source="reschke">Add "Depth" header considerations:</cref>
</t>
<t>
   If a resource, source or destination, within the scope of the method
   with a Depth header is locked in such a way as to prevent the
   successful execution of the method, then the lock token for that
   resource MUST be submitted with the request in the If request header.
</t>

</section>

<section title="If Header" anchor="HEADER_If">
<t>
  <cref source="reschke">Add "If" header considerations:</cref>
</t>
</section>

<section title="Lock-Token Header" anchor="HEADER_Lock-Token">
<iref item="Lock-Token header" primary="true"/>
<iref item="Headers" subitem="Lock-Token" primary="true"/>
<figure><artwork>
   Lock-Token = "Lock-Token" ":" Coded-URL
</artwork></figure>
<t>
   The Lock-Token request header is used with the UNLOCK method to
   identify the lock to be removed.  The lock token in the Lock-Token
   request header MUST identify a lock that contains the resource
   identified by Request-URI as a member.
</t><t>
   The Lock-Token response header is used with the LOCK method to
   indicate the lock token created as a result of a successful LOCK
   request to create a new lock.
</t>
</section>

<section title="Timeout Request Header" anchor="HEADER_Timeout">
<iref item="Timeout header" primary="true"/>
<iref item="Headers" subitem="Timeout" primary="true"/>
<figure>
<ed:replace datetime="2004-05-21" ed:resolves="updated-rfc2068"><ed:del>
<artwork>
   TimeOut = "Timeout" ":" 1#TimeType
   TimeType = ("Second-" DAVTimeOutVal | "Infinite" | Other)
   DAVTimeOutVal = 1*digit
   Other = "Extend" field-value   ; See section 4.2 of [RFC2068]
</artwork>
</ed:del><ed:ins>
<artwork>
   TimeOut = "Timeout" ":" 1#TimeType
   TimeType = ("Second-" DAVTimeOutVal | "Infinite" | Other)
   DAVTimeOutVal = 1*digit
   Other = "Extend" field-value   ; See section 4.2 of [RFC2616]
</artwork>
</ed:ins></ed:replace>
</figure>
<t>
   Clients may include Timeout headers in their LOCK requests.  However,
   the server is not required to honor or even consider these requests.
   Clients MUST NOT submit a Timeout request header with any method
   other than a LOCK method.
</t><t>
   A Timeout request header MUST contain at least one TimeType and may
   contain multiple TimeType entries. The purpose of listing multiple
   TimeType entries is to indicate multiple different values and value
   types that are acceptable to the client.  The client lists the
   TimeType entries in order of preference.
</t><t>
   Timeout response values MUST use a Second value, Infinite, or a
   TimeType the client has indicated familiarity with.  The server may
   assume a client is familiar with any TimeType submitted in a Timeout
   header.
</t><t>
   The "Second" TimeType specifies the number of seconds that will
   elapse between granting of the lock at the server, and the automatic
   removal of the lock.  The timeout value for TimeType "Second" MUST
   NOT be greater than 2^32-1.
</t>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="025_LOCK_REFRESH_BY_METHODS" type="change" status="closed">
  <ed:item>
  	Jim Amsden: The specification requires a lock to be refreshed if any method is executed, by anybody, on a locked resource.  This can cause some performance problems.  More importantly, the semantics of this refresh do not seem to be right -- why should a random GET by a third party cause all locks to be refreshed?
  </ed:item>
  <ed:resolution>
    We should remove the mention of this behavior in 2518: <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0137.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JulSep/0137.html</a>
  </ed:resolution>
</ed:issue>
<ed:replace datetime="2004-05-24" ed:resolves="025_LOCK_REFRESH_BY_METHODS"><ed:del>
<t>
   The timeout counter SHOULD be restarted any time an owner of the lock
   sends a method to any member of the lock, including unsupported
   methods, or methods which are unsuccessful.  However the lock MUST be
   refreshed if a refresh LOCK method is successfully received.
</t>
</ed:del></ed:replace>
<t>
   If the timeout expires then the lock may be lost.  Specifically, if
   the server wishes to harvest the lock upon time-out, the server
   SHOULD act as if an UNLOCK method was executed by the server on the
   resource using the lock token of the timed-out lock, performed with
   its override authority. Thus logs should be updated with the
   disposition of the lock, notifications should be sent, etc., just as
   they would be for an UNLOCK request.
</t><t>
   Servers are advised to pay close attention to the values submitted by
   clients, as they will be indicative of the type of activity the
   client intends to perform.  For example, an applet running in a
   browser may need to lock a resource, but because of the instability
   of the environment within which the applet is running, the applet may
   be turned off without warning.  As a result, the applet is likely to
   ask for a relatively small timeout value so that if the applet dies,
   the lock can be quickly harvested.  However, a document management
   system is likely to ask for an extremely long timeout because its
   user may be planning on going off-line.
</t><t>
   A client MUST NOT assume that just because the time-out has expired
   the lock has been lost.
</t>
</section>
</section>

<ed:replace datetime="2004-05-30" ed:resolves="edit"><ed:del>
<section title="Status Code Extensions to HTTP/1.1" anchor="status.code.extensions.to.http11">
<section title="423 Locked" anchor="STATUS_423">
<t>
   The 423 (Locked) status code means the source or destination resource
   of a method is locked.
</t>
</section>
</section>
</ed:del></ed:replace>

<section title="XML Element Definitions" anchor="xml.element.definitions">
<ed:replace datetime="2004-05-30" ed:resolves="edit"><ed:del>
<section title="activelock XML Element" anchor="ELEMENT_activelock">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0047.html">
  <ed:item entered-by="gclemm@rational.com" datetime="2002-01-14">
  	It would be good if a client could look at a locked resource that it was
    planning to unlock and also find out if it's depth locked and where the
    depth lock is rooted. 
  </ed:item>
  <ed:resolution>
    Proposed solution: <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0049.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0049.html</a>
    approved.
    See also <a href="#rfc.issue.109_HOW_TO_FIND_THE_ROOT_OF_A_LOCK">109_HOW_TO_FIND_THE_ROOT_OF_A_LOCK</a>
  </ed:resolution>
</ed:issue>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="109_HOW_TO_FIND_THE_ROOT_OF_A_LOCK" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0049.html">
  <ed:item entered-by="julian.reschke@greenbytes.de" datetime="2002-07-10">
    If one finds a locked resource, it might be one of several resource locked
    by a depth lock.  How does one determine the root of the lock?
  </ed:item>
  <ed:resolution>
    Resolved to support a dav:lockroot element in the lock discovery property:
    <a href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0053.html">http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0053.html</a>
    See <a href="#rfc.issue.089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK">089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK</a>
  </ed:resolution>
</ed:issue>
<iref item="activelock" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">activelock</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Describes a lock on a resource.</t>
</list></t>
<figure>
<ed:replace datetime="2004-05-22" ed:resolves="089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK"><ed:del>
<artwork>
   &lt;!ELEMENT activelock (lockscope, locktype, depth, owner?, timeout?,
   locktoken?) &gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   &lt;!ELEMENT activelock (lockscope, locktype, depth, owner?,
                         timeout?, locktoken?, lockroot) &gt;
</artwork>
</ed:ins></ed:replace>
</figure>

<section title="depth XML Element" anchor="ELEMENT_depth">
<iref item="depth" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">depth</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">The value of the Depth header.</t>
  <t hangText="Value:">"0" | "1" | "infinity"</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT depth (#PCDATA) &gt;
</artwork></figure>
</section>

<section title="locktoken XML Element" anchor="ELEMENT_locktoken">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="111_MULTIPLE_TOKENS_PER_LOCK" type="change" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JulSep/0050.html">
  <ed:item entered-by="julian.reschke@greenbytes.de" datetime="2002-07-10">
    <a href="http://greenbytes.de/tech/webdav/rfc2518.html#ELEMENT_locktoken">12.1.2</a> 
    states that a dav:locktoken tag can have multiple &lt;dav:href&gt; tags in it.
    Is this right?  And is it trying to suggest that a single (shared) lock might
    have multiple locktokens?
  </ed:item>
  <ed:resolution datetime="2004-05-21">
  	It is resolved that section 12.1.2 was incorrect and that only a single
    lock token URI should be allowed there.  Also it is resolved that a lock
    only has a single lock token.
  </ed:resolution>
</ed:issue>
<iref item="locktoken" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">locktoken</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">The lock token associated with a lock.</t>
  <t hangText="Description:">The href contains <ed:replace datetime="2004-05-21" ed:resolves="111_MULTIPLE_TOKENS_PER_LOCK"><ed:del>one or more opaque lock token URIs
   which all refer to the same lock (i.e., the OpaqueLockToken-URI
   production in <xref target="opaquelocktoken.lock.token.uri.scheme"/>).</ed:del>
   <ed:ins>the lock token.</ed:ins></ed:replace></t>
</list></t>
<figure>
<ed:replace datetime="2004-05-21" ed:resolves="111_MULTIPLE_TOKENS_PER_LOCK"><ed:del>
<artwork>
   &lt;!ELEMENT locktoken (href+) &gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   &lt;!ELEMENT locktoken (href) &gt;
</artwork>
</ed:ins></ed:replace>
</figure>
</section>

<ed:replace datetime="2004-05-22" ed:resolves="089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK"><ed:ins>
<section title="lockroot XML Element" anchor="ELEMENT_lockroot">
<iref item="lockroot" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">lockroot</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">The URL of the resource that was addressed in the LOCK request.</t>
  <t hangText="Description:">The href contains the URL of the resource to which the
    LOCK request has been applied.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT lockroot (href) &gt;
</artwork></figure>
</section>
</ed:ins></ed:replace>

<section title="timeout XML Element" anchor="ELEMENT_timeout">
<iref item="timeout" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">timeout</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">The timeout associated with a lock</t>
  <t hangText="Value:">TimeType ;Defined in <xref target="HEADER_Timeout"/></t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT timeout (#PCDATA) &gt;
</artwork></figure>
</section>
</section>
</ed:del></ed:replace>

<ed:replace ed:resolves="edit" datetime="2004-05-30"><ed:del>
<section title="lockentry XML Element" anchor="ELEMENT_lockentry">
<iref item="lockentry" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">lockentry</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Defines the types of locks that can be used with the
   resource.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT lockentry (lockscope, locktype) &gt;
</artwork></figure>
</section>
</ed:del></ed:replace>

<section title="lockinfo XML Element" anchor="ELEMENT_lockinfo">
<iref item="lockinfo" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">lockinfo</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">The lockinfo XML element is used with a LOCK method to
   specify the type of lock the client wishes to have created.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT lockinfo (lockscope, locktype, owner?) &gt;
</artwork></figure>
</section>

<ed:replace ed:resolves="edit" datetime="2004-05-30"><ed:del>
<section title="lockscope XML Element" anchor="ELEMENT_lockscope">
<iref item="lockscope" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">lockscope</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Specifies whether a lock is an exclusive lock, or a
   shared lock.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT lockscope (exclusive | shared) &gt;
</artwork></figure>

<section title="exclusive XML Element" anchor="ELEMENT_exclusive">
<iref item="exclusive" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">exclusive</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Specifies an exclusive lock</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT exclusive EMPTY &gt;
</artwork></figure>
</section>

<section title="shared XML Element" anchor="ELEMENT_shared">
<iref item="shared" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">shared</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Specifies a shared lock</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT shared EMPTY &gt;
</artwork></figure>
</section>
</section>

<section title="locktype XML Element" anchor="ELEMENT_locktype">
<iref item="locktype" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">locktype</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Specifies the access type of a lock.  At present, this
   specification only defines one lock type, the write lock.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT locktype (write) &gt;
</artwork></figure>

<section title="write XML Element" anchor="ELEMENT_write">
<iref item="write" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">write</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Specifies a write lock.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT write EMPTY &gt;
</artwork></figure>
</section>
</section>

<section title="owner XML Element" anchor="ELEMENT_owner">
<iref item="owner" subitem="XML element"/>
<t><list style="hanging">
  <t hangText="Name:">owner</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Provides information about the principal taking out a
   lock.</t>
  <t hangText="Description:">The owner XML element provides information sufficient
   for either directly contacting a principal (such as a telephone
   number or Email URI), or for discovering the principal (such as the
   URL of a homepage) who owns a lock.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT owner ANY&gt;
</artwork></figure>
</section>
</ed:del></ed:replace>
</section>

<ed:replace ed:resolves="edit" datetime="2004-05-30"><ed:del>
<section title="DAV Properties" anchor="dav.properties">

<section title="lockdiscovery Property" anchor="PROPERTY_lockdiscovery">
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="101_LOCKDISCOVERY_FORMAT_FOR_MULTIPLE_SHARED_LOCKS" type="edit" status="closed" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0215.html">
  <ed:item entered-by="julian.reschke@greenbytes.de" datetime="2002-02-26">
    There is some confusion on how a PROPFIND response should express the fact
    that a resource has multiple shared locks on it.  It was suggested that the
    spec become clearer.
  </ed:item>
  <ed:resolution datetime="2004-05-22">
    Resolved trivially that it's probably worthwhile to demonstrate a correct
    response for this situation in one of the examples.
  </ed:resolution>
</ed:issue>
<iref item="DAV:lockdiscovery property" primary="true"/>
<iref item="Properties" subitem="DAV:lockdiscovery" primary="true"/>
<t><list style="hanging">
  <t hangText="Name:">lockdiscovery</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">Describes the active locks on a resource</t>
  <t hangText="Description:">The lockdiscovery property returns a listing of who has
   a lock, what type of lock he has, the timeout type and the time
   remaining on the timeout, and the associated lock token.  The server
   is free to withhold any or all of this information if the requesting
   principal does not have sufficient access rights to see the requested
   data.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT lockdiscovery (activelock)* &gt;
</artwork></figure>

<section title="Example - Retrieving the lockdiscovery Property">
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace ed:resolves="rfc2606-compliance" datetime="2004-05-22"><ed:del>
<artwork>
   PROPFIND /container/ HTTP/1.1
   Host: www.foo.bar
   Content-Length: xxxx
   Content-Type: text/xml; charset="utf-8"

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:propfind xmlns:D='DAV:'&gt;
     &lt;D:prop&gt;&lt;D:lockdiscovery/&gt;&lt;/D:prop&gt;
   &lt;/D:propfind&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   PROPFIND /container/ HTTP/1.1
   Host: example.com
   Content-Length: xxxx
   Content-Type: text/xml; charset="utf-8"

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:propfind xmlns:D='DAV:'&gt;
     &lt;D:prop&gt;&lt;D:lockdiscovery/&gt;&lt;/D:prop&gt;
   &lt;/D:propfind&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<ed:replace ed:resolves="101_LOCKDISCOVERY_FORMAT_FOR_MULTIPLE_SHARED_LOCKS" datetime="2004-05-22"><ed:resolves>089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK</ed:resolves>
<ed:del>
<artwork>
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:multistatus xmlns:D='DAV:'&gt;
     &lt;D:response&gt;
          &lt;D:href&gt;http://www.foo.bar/container/&lt;/D:href&gt;
          &lt;D:propstat&gt;
               &lt;D:prop&gt;
                    &lt;D:lockdiscovery&gt;
                         &lt;D:activelock&gt;
                              &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
                              &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
                              &lt;D:depth&gt;0&lt;/D:depth&gt;
                              &lt;D:owner&gt;Jane Smith&lt;/D:owner&gt;
                              &lt;D:timeout&gt;Infinite&lt;/D:timeout&gt;
                              &lt;D:locktoken&gt;
                                   &lt;D:href&gt;
               opaquelocktoken:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d76
                                   &lt;/D:href&gt;
                              &lt;/D:locktoken&gt;
                         &lt;/D:activelock&gt;
                    &lt;/D:lockdiscovery&gt;
               &lt;/D:prop&gt;
               &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
          &lt;/D:propstat&gt;
     &lt;/D:response&gt;
   &lt;/D:multistatus&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:multistatus xmlns:D='DAV:'&gt;
     &lt;D:response&gt;
       &lt;D:href&gt;http://example.com/container/&lt;/D:href&gt;
       &lt;D:propstat&gt;
         &lt;D:prop&gt;
           &lt;D:lockdiscovery&gt;
             &lt;D:activelock&gt;
               &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
               &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
               &lt;D:depth&gt;0&lt;/D:depth&gt;
               &lt;D:owner&gt;Jane Smith&lt;/D:owner&gt;
               &lt;D:timeout&gt;Infinite&lt;/D:timeout&gt;
               &lt;D:locktoken&gt;
                 &lt;D:href
  &gt;opaquelocktoken:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d76&lt;/D:href&gt;
               &lt;/D:locktoken&gt;
               &lt;D:lockroot&gt;
                 &lt;D:href
  &gt;http://example.com/container/&lt;/D:href&gt;
               &lt;/D:lockroot&gt;
             &lt;/D:activelock&gt;
           &lt;/D:lockdiscovery&gt;
           &lt;D:lockdiscovery&gt;
             &lt;D:activelock&gt;
               &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
               &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
               &lt;D:depth&gt;0&lt;/D:depth&gt;
               &lt;D:owner&gt;John Doe&lt;/D:owner&gt;
               &lt;D:timeout&gt;Infinite&lt;/D:timeout&gt;
               &lt;D:locktoken&gt;
                 &lt;D:href
  &gt;opaquelocktoken:f81de2ad-7f3d-a1b2-4f3c-00a0c91a9d77&lt;/D:href&gt;
               &lt;/D:locktoken&gt;
               &lt;D:lockroot&gt;
                 &lt;D:href
  &gt;http://example.com/container/&lt;/D:href&gt;
               &lt;/D:lockroot&gt;
             &lt;/D:activelock&gt;
           &lt;/D:lockdiscovery&gt;
         &lt;/D:prop&gt;
         &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
       &lt;/D:propstat&gt;
     &lt;/D:response&gt;
   &lt;/D:multistatus&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<t>
  This resource has
<ed:replace ed:resolves="101_LOCKDISCOVERY_FORMAT_FOR_MULTIPLE_SHARED_LOCKS" datetime="2004-05-22"><ed:del>
  a single exclusive write lock on it, with an
  infinite timeout.
</ed:del><ed:ins>
  two shared write locks on it, with infinite timeouts.   
</ed:ins></ed:replace>
</t>
</section>
</section>

<section title="supportedlock Property" anchor="PROPERTY_supportedlock">
<iref item="DAV:supportedlock property" primary="true"/>
<iref item="Properties" subitem="DAV:supportedlock" primary="true"/>
<t><list style="hanging">
  <t hangText="Name:">supportedlock</t>
  <t hangText="Namespace:">DAV:</t>
  <t hangText="Purpose:">To provide a listing of the lock capabilities supported
   by the resource.</t>
  <t hangText="Description:">The supportedlock property of a resource returns a
   listing of the combinations of scope and access types which may be
   specified in a lock request on the resource.  Note that the actual
   contents are themselves controlled by access controls so a server is
   not required to provide information the client is not authorized to
   see.</t>
</list></t>
<figure><artwork>
   &lt;!ELEMENT supportedlock (lockentry)* &gt;
</artwork></figure>

<section title="Example - Retrieving the supportedlock Property">
<figure><preamble>
   &gt;&gt;Request</preamble>
<ed:replace ed:resolves="rfc2606-compliance" datetime="2004-05-22"><ed:del>
<artwork>
   PROPFIND  /container/ HTTP/1.1
   Host: www.foo.bar
   Content-Length: xxxx
   Content-Type: text/xml; charset="utf-8"

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:propfind xmlns:D="DAV:"&gt;
     &lt;D:prop&gt;&lt;D:supportedlock/&gt;&lt;/D:prop&gt;
   &lt;/D:propfind&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   PROPFIND  /container/ HTTP/1.1
   Host: example.com
   Content-Length: xxxx
   Content-Type: text/xml; charset="utf-8"

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:propfind xmlns:D="DAV:"&gt;
     &lt;D:prop&gt;&lt;D:supportedlock/&gt;&lt;/D:prop&gt;
   &lt;/D:propfind&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
<figure><preamble>
   &gt;&gt;Response</preamble>
<ed:replace ed:resolves="rfc2606-compliance" datetime="2004-05-22"><ed:del>
<artwork>
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:multistatus xmlns:D="DAV:"&gt;
     &lt;D:response&gt;
          &lt;D:href&gt;http://www.foo.bar/container/&lt;/D:href&gt;
          &lt;D:propstat&gt;
               &lt;D:prop&gt;
                    &lt;D:supportedlock&gt;
                         &lt;D:lockentry&gt;
                              &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
                              &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
                         &lt;/D:lockentry&gt;
                         &lt;D:lockentry&gt;
                              &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
                              &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
                         &lt;/D:lockentry&gt;
                    &lt;/D:supportedlock&gt;
               &lt;/D:prop&gt;
               &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
          &lt;/D:propstat&gt;
     &lt;/D:response&gt;
   &lt;/D:multistatus&gt;
</artwork>
</ed:del><ed:ins>
<artwork>
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
   &lt;D:multistatus xmlns:D="DAV:"&gt;
     &lt;D:response&gt;
       &lt;D:href&gt;http://example.com/container/&lt;/D:href&gt;
       &lt;D:propstat&gt;
         &lt;D:prop&gt;
           &lt;D:supportedlock&gt;
             &lt;D:lockentry&gt;
               &lt;D:lockscope&gt;&lt;D:exclusive/&gt;&lt;/D:lockscope&gt;
               &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
             &lt;/D:lockentry&gt;
             &lt;D:lockentry&gt;
               &lt;D:lockscope&gt;&lt;D:shared/&gt;&lt;/D:lockscope&gt;
               &lt;D:locktype&gt;&lt;D:write/&gt;&lt;/D:locktype&gt;
             &lt;/D:lockentry&gt;
           &lt;/D:supportedlock&gt;
         &lt;/D:prop&gt;
         &lt;D:status&gt;HTTP/1.1 200 OK&lt;/D:status&gt;
       &lt;/D:propstat&gt;
     &lt;/D:response&gt;
   &lt;/D:multistatus&gt;
</artwork>
</ed:ins></ed:replace>
</figure>
</section>
</section>
</section>
</ed:del></ed:replace>

<ed:replace ed:resolves="edit" datetime="2004-05-31"><ed:del>
<section title="DAV Compliance Classes">
<section title="Class 2">
<iref item="DAV header" subitem="compliance class '2'" primary="true"/>
<t>
   A class 2 compliant resource MUST meet all class 1 requirements and
   support the LOCK method, the <ed:replace datetime="2004-05-26" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>supportedlock property, the
   <ed:replace datetime="2004-05-26" ed:resolves="edit"><ed:ins>DAV:</ed:ins></ed:replace>lockdiscovery property, the Time-Out response header and the Lock-Token
   request header.  A class "2" compliant resource SHOULD also
   support the Time-Out request header and the owner XML element.
</t><t>
   Class 2 compliant resources MUST return, at minimum, the values "1"
   and "2" in the DAV header on all responses to the OPTIONS method.
</t>
</section>
</section>
</ed:del></ed:replace>

<ed:replace datetime="2004-05-31" ed:resolves="edit"><ed:del>
<section title="Security Considerations">
<section title="Authentication of Clients">
<t>
  Furthermore,
  the introduction of locking functionality requires support for
  authentication.
</t>
</section>

<section title="Privacy Issues Connected to Locks" anchor="deleted-risks.connected.with.lock.tokens">
<t>
   When submitting a lock request a user agent may also submit an owner
   XML field giving contact information for the person taking out the
   lock (for those cases where a person, rather than a robot, is taking
   out the lock). This contact information is stored in a lockdiscovery
   property on the resource, and can be used by other collaborators to
   begin negotiation over access to the resource.  However, in many
   cases this contact information can be very private, and should not be
   widely disseminated.  Servers SHOULD limit read access to the
   lockdiscovery property as appropriate.  Furthermore, user agents
   SHOULD provide control over whether contact information is sent at
   all, and if contact information is sent, control over exactly what
   information is sent.
</t>
</section>
</section>
</ed:del></ed:replace>

<ed:replace ed:resolves="edit" datetime="2004-05-31"><ed:del>
<section title="IANA Considerations">
<t>
   This specification also defines a URI scheme for the encoding of lock
   tokens, the opaquelocktoken URI scheme described in <xref target="opaquelocktoken.lock.token.uri.scheme"/>.
</t>
</section>
</ed:del></ed:replace>

</section>

<section title="GULP">
<t>
  <spanx>Copied from </spanx><eref target="http://lists.w3.org/Archives/Public/w3c-dist-auth/2004JanMar/0001.html"/>.
</t>
<ed:replace ed:resolves="edit" datetime="2004-05-31"><ed:del>
<t>
  <list style="symbols">
    <t>
  A lock either directly or indirectly locks a resource.
    </t>
    <t>
  A LOCK request with a non-empty body creates a new lock, and the
  resource identified by the request-URL is directly locked by that lock.
  The "lock-root" of the new lock is the request-URL. If at the time of
  the request, the request-URL is not mapped to a resource, a new
  resource with no content MUST be created by the request.
    </t>
    <t>
  If a collection is directly locked by a depth:infinity lock, all
  members of that collection (other than the collection itself) are
  indirectly locked by that lock.  In particular, if an internal
  member resource is added to a collection that is locked by a
  depth:infinity lock, and if the resource is not locked by that lock,
  then the resource becomes indirectly locked by that lock.
  Conversely, if a resource is indirectly locked with a depth:infinity
  lock, and if the result of deleting an internal member URI is that
  the resource is no longer a member of the collection that is
  directly locked by that lock, then the resource is no longer locked
  by that lock.
    </t>
    <t>
  An UNLOCK request deletes the lock with the specified lock token.
  The request-URL of the request MUST identify the resource that
  is directly locked by that lock.  After a lock is deleted,
  no resource is locked by that lock.
    </t>
    <t>
  A lock token is "submitted" in a request when it appears in an If
  header.
    </t>
    <t>
  If a request would modify the content for a locked resource, a dead
  property of a locked resource, a live property that is defined to be
  lockable for a locked resource, or an internal member URI of a
  locked collection, the request MUST fail unless the lock-token for
  that lock is submitted in the request.  An internal member URI
  of a collection is considered to be modified if it is added,
  removed, or identifies a different resource.  
    </t>
    <t>
  If a request causes a directly locked resource to no longer be
  mapped to the lock-root of that lock, then the request MUST
  fail unless the lock-token for that lock is submitted in the
  request.  If the request succeeds, then that lock MUST have been
  deleted by that request.
    </t>
    <t>
  If a request would cause a resource to be locked by two different
  exclusive locks, the request MUST fail.
    </t>
  </list>
</t>
</ed:del><ed:ins>

<section title="Directly vs Indirectly" anchor="semantics.1">
<t>
  A lock either directly or indirectly locks a resource.
</t>
</section>

<section title="Creating Locks" anchor="semantics.2">
<t>
  A LOCK request with a non-empty body creates a new lock, and the
  resource identified by the request-URL is directly locked by that lock.  The
  "lock-root" of the new lock is the request-URL.  If at the time of
  the request, the request-URL is not mapped to a resource, a new
  resource with no content MUST be created by the request.
</t>
</section>

<section title="Lock Inheritance" anchor="semantics.3">
<t>
  If a collection is directly locked by a depth:infinity lock, all
  members of that collection (other than the collection itself) are
  indirectly locked by that lock.  In particular, if an internal
  member resource is added to a collection that is locked by a
  depth:infinity lock, and if the resource is not locked by that lock,
  then the resource becomes indirectly locked by that lock.  Conversely,
  if a resource is indirectly locked with a depth:infinity
  lock, and if the result of deleting an internal member URI is that
  the resource is no longer a member of the collection that is
  directly locked by that lock, then the resource is no longer locked
  by that lock.
</t>
</section>

<section title="Removing Locks" anchor="semantics.4">
<t>
  An UNLOCK request deletes the lock with the specified lock token.  The request-URL
  of the request MUST identify the resource that
  is directly locked by that lock.  After a lock is deleted,
  no resource is locked by that lock.
</t>
</section>

<section title="Submitting Lock Tokens" anchor="semantics.5">
<t>
  A lock token is "submitted" in a request when it appears in an "If" request
  header.
</t>
</section>

<section title="Locked State" anchor="semantics.6">
<t>
  If a request would modify the content for a locked resource, a dead
  property of a locked resource, a live property that is defined to be
  lockable for a locked resource, or an internal member URI of a
  locked collection, the request MUST fail unless the lock-token for
  that lock is submitted in the request.  An internal member URI
  of a collection is considered to be modified if it is added,
  removed, or identifies a different resource.  
</t>
</section>

<section title="URL protection" anchor="semantics.7">
<t>
  If a request causes a directly locked resource to no longer be
  mapped to the lock-root of that lock, then the request MUST
  fail unless the lock-token for that lock is submitted in the
  request.  If the request succeeds, then that lock MUST have been
  deleted by that request.
</t>
</section>

<section title="Exclusive vs Shared" anchor="semantics.8">
<t>
  If a request would cause a resource to be locked by two different
  exclusive locks, the request MUST fail.
</t>
</section>
</ed:ins></ed:replace>
</section>

<ed:replace ed:resolves="015_MOVE_SECTION_6.4.1_TO_APPX" datetime="2004-05-31"><ed:ins> 
<section title="'opaquelocktoken' URI Scheme" anchor="opaquelocktoken.lock.token.uri.scheme">
<iref item="opaquelocktoken (URI scheme)" primary="true"/>
<iref item="URI schemes" subitem="opaquelocktoken" primary="true"/>
<ed:issue xmlns='http://www.w3.org/1999/xhtml' name="015_MOVE_SECTION_6.4.1_TO_APPX" type="change" status="open" href="http://lists.w3.org/Archives/Public/w3c-dist-auth/1998OctDec/0234.html">
  <ed:item entered-by="mda@discerning.com" date="1998-11-24">
    The discussion of generating UUID node fields without using the IEEE 802 address in <a href="http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.6.4.1">section 6.4.1</a> can be moved to an appendix.
  </ed:item>
  <ed:item entered-by="julian.reschke@greenbytes.de" date="2004-04-31">
    Plan: get rid of the section altogether and refer to draft-mealling-uuid-urn.
    In the meantime, move the whole opaquelocktoken discussion into an appendix.
  </ed:item>
</ed:issue>
<t>
   The opaquelocktoken URI scheme is designed to be unique across all
   resources for all time.  Due to this uniqueness quality, a client may
   submit an opaque lock token in an If header on a resource other than
   the one that returned it.
</t>
<t>
   All resources MUST recognize the opaquelocktoken scheme and, at
   minimum, recognize that the lock token does not refer to an
   outstanding lock on the resource.
</t>
<t>
   In order to guarantee uniqueness across all resources for all time
   the opaquelocktoken requires the use of the Universal Unique
   Identifier (UUID) mechanism, as described in <xref target="ISO-11578"/>.
</t>
<t>
   Opaquelocktoken generators, however, have a choice of how they create
   these tokens.  They can either generate a new UUID for every lock
   token they create or they can create a single UUID  and then add
   extension characters.  If the second method is selected then the
   program generating the extensions MUST guarantee that the same
   extension will never be used twice with the associated UUID.
</t>
<t>
   OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension]  ; The UUID
   production is the string representation of a UUID, as defined in
   <xref target="ISO-11578"/>. Note that white space (LWS) is not allowed between
   elements of this production.
</t>
<t>
   Extension = path  ; path is defined in <xref target="RFC2396"/>, section 3.3.
</t>

<section title="Node Field Generation Without the IEEE 802 Address">
<t>
   UUIDs, as defined in <xref target="ISO-11578"/>, contain a "node" field that
   contains one of the IEEE 802 addresses for the server machine.  As
   noted in <xref target="risks.connected.with.lock.tokens"/>, there are several security risks associated
   with exposing a machine's IEEE 802 address. This section provides an
   alternate mechanism for generating the "node" field of a UUID which
   does not employ an IEEE 802 address.  WebDAV servers MAY use this
   algorithm for creating the node field when generating UUIDs.  The
   text in this section is originally from an Internet-Draft by Paul
   Leach and Rich Salz, who are noted here to properly attribute their
   work.
</t>
<t>
   The ideal solution is to obtain a 47 bit cryptographic quality random
   number, and use it as the low 47 bits of the node ID, with the most
   significant bit of the first octet of the node ID set to 1.  This bit
   is the unicast/multicast bit, which will never be set in IEEE 802
   addresses obtained from network cards; hence, there can never be a
   conflict between UUIDs generated by machines with and without network
   cards.
</t>
<t>
   If a system does not have a primitive to generate cryptographic
   quality random numbers, then in most systems there are usually a
   fairly large number of sources of randomness available from which one
   can be generated. Such sources are system specific, but often
   include:
</t>
<t>
  <list style="symbols">
    <t>the percent of memory in use</t>
    <t>the size of main memory in bytes</t>
    <t>the amount of free main memory in bytes</t>
    <t>the size of the paging or swap file in bytes</t>
    <t>free bytes of paging or swap file</t>
    <t>the total size of user virtual address space in bytes</t>
    <t>the total available user address space bytes</t>
    <t>the size of boot disk drive in bytes</t>
    <t>the free disk space on boot drive in bytes</t>
    <t>the current time</t>
    <t>the amount of time since the system booted</t>
    <t>the individual sizes of files in various system directories</t>
    <t>the creation, last read, and modification times of files in
      various system directories</t>
    <t>the utilization factors of various system resources (heap, etc.)</t>
    <t>current mouse cursor position</t>
    <t>current caret position</t>
    <t>current number of running processes, threads</t>
    <t>handles or IDs of the desktop window and the active window</t>
    <t>the value of stack pointer of the caller</t>
    <t>the process and thread ID of caller</t>
    <t>various processor architecture specific performance counters
      (instructions executed, cache misses, TLB misses)</t>
  </list>
</t>
<t>
   (Note that it is precisely the above kinds of sources of randomness
   that are used to seed cryptographic quality random number generators
   on systems without special hardware for their construction.)
</t>
<t>
   In addition, items such as the computer's name and the name of the
   operating system, while not strictly speaking random, will help
   differentiate the results from those obtained by other systems.
</t>
<t>
   The exact algorithm to generate a node ID using these data is system
   specific, because both the data available and the functions to obtain
   them are often very system specific. However, assuming that one can
   concatenate all the values from the randomness sources into a buffer,
   and that a cryptographic hash function such as MD5 is available, then
   any 6 bytes of the MD5 hash of the buffer, with the multicast bit
   (the high bit of the first byte) set will be an appropriately random
   node ID.
</t>
<t>
   Other hash functions, such as SHA-1, can also be used. The only
   requirement is that the result be suitably random in the sense that
   the outputs from a set uniformly distributed inputs are themselves
   uniformly distributed, and that a single bit change in the input can
   be expected to cause half of the output bits to change.
</t>
</section>
</section>
</ed:ins></ed:replace>


<ed:replace datetime="2004-05-31">
<ed:ins>
<section title="Change Log (to be removed by RFC Editor before publication)">

<section title="Since draft-reschke-webdav-locking-00">
  <t>
    Add and resolve issue "rfc2606-compliance".
    Resolve issues "extract-locking", "updated-rfc2068",
    "022_COPY_OVERWRITE_LOCK_NULL", 
    "025_LOCK_REFRESH_BY_METHODS",
    "037_DEEP_LOCK_ERROR_STATUS",
    "039_MISSING_LOCK_TOKEN",
    "040_LOCK_ISSUES_01",  
    "040_LOCK_ISSUES_02",
    "040_LOCK_ISSUES_05",
    "043_NULL_LOCK_SLASH_URL",
    "065_UNLOCK_WHAT_URL",
    "077_LOCK_NULL_STATUS_CREATION",
    "080_DEFER_LOCK_NULL_RESOURCES_IN_SPEC",
    "089_FINDING_THE_ROOT_OF_A_DEPTH_LOCK",
    "101_LOCKDISCOVERY_FORMAT_FOR_MULTIPLE_SHARED_LOCKS",
    "109_HOW_TO_FIND_THE_ROOT_OF_A_LOCK"
    and "111_MULTIPLE_TOKENS_PER_LOCK".
    Add issue "import-gulp".
    Start work on moving text from RFC2518 excerpts into new sections.
    Define new compliance class "locking" (similar to "bis" in RFC2518bis, but
    only relevant to locking).  Reformatted "GULP" into separate subsections
    for easier reference.
  </t>
</section>

</section>
</ed:ins>
</ed:replace>



  
    </back>
</rfc>