home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_u_z / draft-ietf-webdav-depth-00.txt < prev    next >
Text File  |  1997-10-09  |  21KB  |  596 lines

  1. INTERNET-DRAFT                                         Yaron Y. Goland
  2. Expires: March 1998                                       Saveen Reddy
  3.                                                  Microsoft Corporation
  4.                                                           Oct. 8, 1997
  5.  
  6.  
  7.                          WebDAV Tree Operations
  8.                      draft-ietf-webdav-depth-00.txt
  9.  
  10.  
  11. 1.   Status of this Memo
  12.  
  13.         This document is an Internet-Draft.  Internet-Drafts are
  14.    working documents of the Internet Engineering Task Force (IETF), its
  15.    areas, and its working groups.  Note that other groups may also
  16.    distribute working documents as Internet-Drafts.
  17.  
  18.    Internet-Drafts are draft documents valid for a maximum of six
  19.    months and may be updated, replaced, or obsoleted by other documents
  20.    at any time.  It is inappropriate to use Internet-Drafts as
  21.    reference material or to cite them other than as "work in progress."
  22.  
  23.    To view the entire list of current Internet-Drafts, please check the
  24.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  25.    Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe),
  26.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  27.    ftp.isi.edu (US West Coast).
  28.  
  29. 2.   Abstract
  30.  
  31.    The WebDAV protocol specification [Goland et al., 1997] defines the
  32.    DELETE, COPY and MOVE methods. However these methods have a scope of
  33.    a single source resource. It is common for principals to wish to
  34.    perform a DELETE, COPY or MOVE on a collection and all its internal
  35.    members. This specification defines the DELETE-TREE, COPY-TREE and
  36.    MOVE-TREE methods that perform the equivalent of DELETE, COPY and
  37.    MOVE across a collection and all its progeny.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Goland & Reddy                                                [Page 1]
  59.  
  60. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  61.  
  62.  
  63. 3.   Contents
  64.  
  65.    1. Status of this Memo.............................................1
  66.    2. Abstract........................................................1
  67.    3. Contents........................................................2
  68.    4. Problem Definition..............................................2
  69.    5. Proposed Solution...............................................3
  70.    6. Levels of Recursion.............................................3
  71.    7. Message Headers and Recursion...................................3
  72.    8. Lock Tokens and *-TREE Methods..................................4
  73.    9. DELETE-TREE Method..............................................4
  74.    10.COPY-TREE Method................................................6
  75.    11.MOVE-TREE Method................................................7
  76.    12.102 "Processing" Response Code..................................9
  77.    13.Status-URI Response Header......................................9
  78.    14.Author's Address...............................................10
  79.    15.Bibliography...................................................10
  80.  
  81. 4.   Problem Definition
  82.  
  83.    HTTP is designed such that a single message causes a single action
  84.    on a single resource. This has proven to be a simple, interoperable,
  85.    robust mechanism for delivering methods. In addition, in a world
  86.    where the majority of requests are GETS, it is also a 'fair'
  87.    arbitrator of server resources. Specifically, as load increases each
  88.    client suffers degradation in service proportional to the number of
  89.    requests made.
  90.  
  91.    However clients often wish to perform actions against all internal
  92.    members of a collection. Currently a client has no choice but to
  93.    execute each method individually on each member of the collection,
  94.    in other words, there is no way to instruct a server to recurse
  95.    through a namespace on behalf of a client.
  96.  
  97.    In many cases forcing the client to perform their own recursive
  98.    calls is a desirable situation as it maintains the fairness of load
  99.    distribution. The average HTTP editing server, which handles mostly
  100.    GETs and PUTs with the occasional COPY or MOVE, is probably better
  101.    off using non-recursive operations.
  102.  
  103.    However some servers routinely deal with operations on collection,
  104.    so routinely in fact that they have developed a number of
  105.    optimizations to allow them to quickly execute an operation against
  106.    a hierarchy.
  107.  
  108.    A typical example is a copy on write system which can copy an entire
  109.    hierarchy by putting a single pointer into the server's internal
  110.    namespace and then tracking when one of the original resources is
  111.    changed, thus performing the copy only when required. These servers
  112.    are unable to take advantage of their optimizations because DAV does
  113.    not provide a way for a client to tell the server that it intends to
  114.    execute the copy against an entire hierarchy.
  115.  
  116.  
  117. Goland & Reddy                                                [Page 2]
  118.  
  119. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  120.  
  121.  
  122.  
  123.    In addition, in some circumstances, it is too expensive for clients
  124.    to handle recursion themselves. For example, a hand held unit with
  125.    limited memory, power, and bandwidth, would not be able to deal very
  126.    well with a simple operation such as deleting a collection. The hand
  127.    held unit would be required to execute a large number of methods and
  128.    potentially record a large number of index entries as it recurses
  129.    through the hierarchy. In such cases fairness takes second place to
  130.    access.
  131.  
  132.    As such a means is needed for a client to efficiently indicate to a
  133.    server its desire to execute a single method against a hierarchy.
  134.  
  135. 5.   Proposed Solution
  136.  
  137.    The proposed solution is the introduction of three new methods:
  138.    DELETE-TREE, COPY-TREE, and MOVE-TREE.
  139.  
  140.    The three new methods are not the same as their root methods,
  141.    DELETE, COPY, and MOVE. For example, a MOVE on a collection has
  142.    different semantics then MOVE on a single resource.
  143.  
  144.    Clients MUST NOT rely upon the three new methods executing on
  145.    members of their hierarchies in any particular order and the three
  146.    new methods are not atomic.
  147.  
  148.    Upon executing the three new methods will perform as much of their
  149.    assigned task as possible and then return a response specifying what
  150.    they were able to accomplish and what they failed to do.
  151.  
  152.    So, for example, an attempt to COPY a hierarchy may result in some
  153.    of the members being copied and some not.
  154.  
  155. 6.   Levels of Recursion
  156.  
  157.    As currently defined, all three new methods apply to the full length
  158.    of the hierarchy. It has been suggested that the number of levels to
  159.    be recursed should be an option. However no compelling case has been
  160.    presented for why allowing the depth of recursion to be controlled
  161.    is a desirable feature. As such this specification errs on the side
  162.    of simplicity and declares that all three new methods apply to the
  163.    full hierarchy.
  164.  
  165. 7.   Message Headers and Recursion
  166.  
  167.    Any headers on the three new methods MUST be applied to all
  168.    resources in the scope of the method. For example, an if-match
  169.    header will have its value applied against every resource in the
  170.    method's scope and will cause the method to fail if the header fails
  171.    to match properly.
  172.  
  173.  
  174.  
  175.  
  176. Goland & Reddy                                                [Page 3]
  177.  
  178. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  179.  
  180.  
  181.    [Ed. Note: No, this isn't an error. Think about it, if you put an
  182.    'if-match: *' what are you after? I think that putting propagation
  183.    rules are just going to complicate things beyond reason. Look at the
  184.    typical case 'I only want to copy this collection if its membership
  185.    has changed or if the value of its members have changed.' The best
  186.    an e-tag could give you is detection of membership change, not if
  187.    the member's values have changed. I say leave well enough alone and
  188.    just propagate everything.]
  189.  
  190. 8.   Lock Tokens and *-TREE Methods
  191.    If a resource, source or destination, within scope of the *-TREE
  192.    method is locked in such a way as to prevent the successful
  193.    execution of the *-TREE method, then the lock token for that
  194.    resource MUST be submitted with the *-TREE request in the State-
  195.    Token request header.
  196.  
  197. 9.   DELETE-TREE Method
  198.  
  199. 9.1. Request
  200.  
  201.    The DELETE-TREE method is only meaningful on a collection. If used
  202.    on a non-collection the DELETE-TREE MUST be treated as a DELETE.
  203.  
  204.    DELETE-TREE instructs that the collection specified in the request-
  205.    URI, the records of its external member resources, and all its
  206.    internal member resources, are to be deleted.
  207.  
  208.  
  209.    Any headers included with DELETE-TREE MUST be applied in processing
  210.    every resource to be deleted. In this case, a header of special
  211.    interest is the DESTROY header which specifies the method to be used
  212.    to delete all resources in the scope of the DELETE-TREE.
  213.  
  214.    When the DELETE-TREE method has completed processing it MUST return
  215.    a consistent namespace. Please refer to [Goland et al., 1997] for a
  216.    full definition of a consistent namespace.
  217.  
  218. 9.2. Response
  219.  
  220.    The response SHOULD be a multi-status response that describes the
  221.    result of the DELETE-TREE on each effected resource.
  222.  
  223.    [Editor's Note: The response to a TREE method could potentially be
  224.    huge, larger than a client may want or need to deal with. It has
  225.    been suggested that clients be given the ability to tell the server
  226.    they only want to get back a response code, not a response body.
  227.    Thoughts?]
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237. Goland & Reddy                                                [Page 4]
  238.  
  239. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  240.  
  241.  
  242. 9.3. Response Codes
  243.  
  244.    415 Conflict - This can be used to indicate that some unspecified
  245.    problem has occurred which makes it impossible to delete a
  246.    particular resource. The most common scenario is that a new internal
  247.    member was added to a collection while a DELETE-TREE was running and
  248.    thus the collection can not be deleted.
  249.  
  250. 9.4. Example
  251.  
  252.    DELETE-TREE  /container/ HTTP/1.1
  253.    Host: www.foo.bar
  254.    Destroy: <http://www.ietf.org/standards/dav/NoUndelete>
  255.  
  256.  
  257.    HTTP/1.1 207 Multi-Response
  258.    Content-Type: text/xml
  259.    Content-Length: xxxxx
  260.  
  261.    <?XML:Namespace href =
  262.         "http://www.ietf.org/standards/dav/" As = "D"/>
  263.    <D:MultiResponse>
  264.      <Response>
  265.           <HREF>http://www.foo.bar/container/resource1</HREF>
  266.           <HREF>http://www.foo.bar/container/resource2</HREF>
  267.           <HREF>http://www.foo.bar/container/</HREF>
  268.           <Status>HTTP/1.1 200 Success</Status>
  269.      </Response>
  270.      <Response>
  271.           <HREF>http://www.foo.bar/container/resource3</HREF>
  272.           <Status>HTTP/1.1 412 Precondition Failed</Status>
  273.      </Response>
  274.    </D:MultiResponse>
  275.  
  276.    In this example the attempt to delete
  277.    http://www.foo.bar/container/resource3 failed. Given that there is
  278.    only one precondition, one can figure out that the failure was
  279.    caused the inability of the system to meet the requirement of the
  280.    Destroy header. Normally however, the client will not know exactly
  281.    what precondition caused the failure.
  282.  
  283.    The result is that www.foo.bar/container/ is created in order to
  284.    maintain namespace integrity.
  285.  
  286.    [Ed-Note: To state the obvious, do we want to provide information on
  287.    which precondition actually failed? This is not the panacea it might
  288.    seem as the failure may have occurred for multiple reasons and
  289.    listing a bunch of headers may or may not be useful. Besides, the
  290.    reality is, nobody every pays attention to error codes. There are
  291.    really only two error codes in the world "It worked" or "Something
  292.    Went Wrong."]
  293.  
  294.  
  295.  
  296. Goland & Reddy                                                [Page 5]
  297.  
  298. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  299.  
  300.  
  301. 10.  COPY-TREE Method
  302.  
  303. 10.1.     Request
  304.  
  305.    The COPY-TREE method is only meaningful on a collection. If used on
  306.    a non-collection the COPY-TREE MUST be treated as a COPY.
  307.  
  308.    COPY-TREE instructs that the collection specified in the Request-
  309.    URI, the records of its external member resources, and all its
  310.    internal member resources, are to be copied to a location relative
  311.    to the Destination header.
  312.  
  313.    Any headers included with COPY-TREE are to be applied in processing
  314.    every resource to be copied.
  315.  
  316.    The exception to this rule is the Destination header. This header
  317.    only specifies the destination for the Request-URI. When applied to
  318.    members of the collection specified in the request-URI the value of
  319.    Destination is to be modified to reflect the current location in the
  320.    hierarchy. So, if the request-URI is "a" and the destination is "b"
  321.    then when a/c/d is processed it MUST use a destination of b/c/d.
  322.  
  323.    When the COPY-TREE method has completed processing it MUST have
  324.    created a consistent namespace at the destination. Thus if it is not
  325.    possible to COPY a collection with internal members, the internal
  326.    members may still be copied but a collection will have to be created
  327.    at the destination to contain them.
  328.  
  329.    Please refer to the definition of COPY in section XYZ of [Goland et
  330.    Al., 1997] for the rules on merging members and properties of source
  331.    collections with pre-existing collections at the destination.
  332.  
  333. 10.2.     Response
  334.  
  335.    The response is a multi-status response that describes the result of
  336.    the COPY-TREE on each effected resource. The response is given for
  337.    the resource that was to be copied, not the resource that was
  338.    created as a result of the copy. In other words, each entry
  339.    indicates if the copy on the resource specified in the HREF
  340.    succeeded or failed and why.
  341.  
  342.    The exception to this rule is for errors that occurred on the
  343.    destination. For example, if the destination was locked the response
  344.    would indicate the destination URL and a 416 "Locked" error.
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356. Goland & Reddy                                                [Page 6]
  357.  
  358. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  359.  
  360.  
  361. 10.3.     Example
  362.  
  363.    COPY-TREE  /container/ HTTP/1.1
  364.    Host: www.foo.bar
  365.    Destination: http://www.foo.bar/othercontainer/
  366.    Enforce-Live-Properties: *
  367.  
  368.    HTTP/1.1 207 Multiresponse
  369.    Content-Type: text/xml
  370.    Content-Length: xxxxx
  371.  
  372.    <?XML:Namespace href =
  373.         "http://www.ietf.org/standards/dav/" As = "D"/>
  374.    <D:MultiResponse>
  375.      <Response>
  376.           <HREF>http://www.foo.bar/container/resource1</HREF>
  377.           <HREF>http://www.foo.bar/container/resource2</HREF>
  378.           <HREF>http://www.foo.bar/container/</HREF>
  379.           <HREF>http://www.foo.bar/container/R2/D2</HREF>
  380.           <Status>HTTP/1.1 201 Created</Status>
  381.      </Response>
  382.      <Response>
  383.           <HREF>http://www.foo.bar/container/R2/</HREF>
  384.           <Status>HTTP/1.1 415 Precondition Failed</Status>
  385.      </Response>
  386.    </D:MultiResponse>
  387.  
  388.    In this example most of the resources, along with the container,
  389.    were copied successfully. However the container R2 failed, most
  390.    likely due to a problem with enforcing live properties. R2's member
  391.    D3 was successfully copied. As a result a collection was created at
  392.    www.foo.bar/othercontainer/R2 to contain D2.
  393.  
  394. 11.  MOVE-TREE Method
  395.  
  396. 11.1.     Request
  397.  
  398.    The MOVE-TREE method is only meaningful on a collection. If used on
  399.    a non-collection the MOVE-TREE MUST be treated as a MOVE.
  400.  
  401.    MOVE-TREE instructs that the collection specified in the Request-
  402.    URI, the records of its external member resources, and all its
  403.    internal member resources, are to be moved to a location relative to
  404.    the Destination header.
  405.  
  406.    Any headers included with MOVE-TREE are to be applied in processing
  407.    every resource to be moved.
  408.  
  409.    The exception to this rule is the Destination header. The behavior
  410.    of this header is the same as given for COPY-TREE.
  411.  
  412.  
  413.  
  414.  
  415.  
  416. Goland & Reddy                                                [Page 7]
  417.  
  418. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  419.  
  420.  
  421.    When the MOVE-TREE method has completed processing it MUST have
  422.    created a consistent namespace on both the source and destination,
  423.    creating collections at the source or destination as necessary.
  424.  
  425.    As specified in the definition of MOVE, a MOVE of a collection over
  426.    another collection causes the destination collection and all its
  427.    members to be deleted.
  428.  
  429. 11.2.     Response
  430.  
  431.    The response is a multi-status response that describes the result of
  432.    the MOVE-TREE on each effected resource. The response is given for
  433.    the resource that was to be moved, not the resource that was created
  434.    as a result of the move. In other words, each entry indicates if the
  435.    move on the resource specified in the HREF succeeded or failed and
  436.    why.
  437.  
  438.    The exception to this rule is for errors that occurred on the
  439.    destination. For example, if the destination was locked the response
  440.    would indicate the destination URL and a 416 "Locked" error.
  441.  
  442. 11.3.     Example
  443.  
  444.    MOVE-TREE  /container/ HTTP/1.1
  445.    Host: www.foo.bar
  446.    Destination: http://www.foo.bar/othercontainer/
  447.    Enforce-Live-Properties: *
  448.    Overwrite: False
  449.    State-Token: <OpaqueLockToken:xxxx> <OpaqueLockToken:xxxx>
  450.  
  451.  
  452.    HTTP/1.1 207 Multiresponse
  453.    Content-Type: text/xml
  454.    Content-Length: xxxxx
  455.  
  456.    <?XML:Namespace href =
  457.         "http://www.ietf.org/standards/dav/" As = "D"/>
  458.    <D:MultiResponse>
  459.      <Response>
  460.           <HREF>http://www.foo.bar/container/resource1</HREF>
  461.           <HREF>http://www.foo.bar/container/resource2</HREF>
  462.           <HREF>http://www.foo.bar/container/</HREF>
  463.           <HREF>http://www.foo.bar/container/C2/R2</HREF>
  464.           <Status>HTTP/1.1 201 Created</Status>
  465.      </Response>
  466.  
  467.      <Response>
  468.           <HREF>http://www.foo.bar/othercontainer/C2</HREF>
  469.           <Status>HTTP/1.1 416 Locked</Status>
  470.      </Response>
  471.    </D:MultiResponse>
  472.  
  473.  
  474.  
  475.  
  476. Goland & Reddy                                                [Page 8]
  477.  
  478. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  479.  
  480.  
  481.    In this example the client has submitted a number of lock tokens
  482.    with the request. A lock token will need to be submitted for every
  483.    resource, both source and destination, anywhere in the scope of the
  484.    method, that is locked. In this case the proper lock token was not
  485.    submitted for the destination http://www.foo.bar/othercontainer/C2.
  486.    However C2's child, R2, was successfully copied.
  487.  
  488. 12.  102 "Processing" Response Code
  489.    The *-Tree methods can potentially take a long period of time to
  490.    process. In such cases the client may time-out the connection while
  491.    waiting for a response. To prevent this the server MAY return a 102
  492.    response code to indicate to the client that the server is still
  493.    processing the method.
  494.  
  495.    If a method is taking longer than [INSERT NUMBER HERE] seconds to
  496.    process the server SHOULD return a 102 "Processing" response.
  497.  
  498. 13.  Status-URI Response Header
  499.  
  500.    The Status-URI response header MAY be used with the 102 "Processing"
  501.    response code to inform the client as to the status of a method.
  502.  
  503.    Status-URI = "Status-URI" ":" *(Status-Code "<" URI ">") ; Status-
  504.    Code is defined in 6.1.1 of [RFC2068]
  505.  
  506.    The URIs listed in the header are source resources which have been
  507.    effected by the outstanding method. The status code indicates the
  508.    resolution of the method on the identified resource. So, for
  509.    example, if a COPY-TREE method is outstanding and a 102 "Processing"
  510.    response with a Status-URI response header is returned, the included
  511.    URIs will indicate resources that have had copy attempted on them
  512.    and what the result was. Note that including the URI does not
  513.    indicate the result of applying the method.
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535. Goland & Reddy                                                [Page 9]
  536.  
  537. INTERNET-DRAFT          WebDAV Tree Operations            Oct. 8, 1997
  538.  
  539.  
  540. 14.  Author's Address
  541.  
  542.    Yaron Y. Goland
  543.    Saveen Reddy
  544.    Microsoft Corporation
  545.    1 Microsoft Way
  546.    Redmond, WA. 98053
  547.    USA
  548.  
  549.    e-mail: {yarong, saveenr}@microsoft.com
  550.  
  551. 15.  Bibliography
  552.  
  553.    [Goland et al., 1997] Y. Goland, E. J. Whitehead, Jr., Asad Faizi,
  554.    Stephen R. Carter, Del Jensen 'Extensions for Distributed Authoring
  555.    and Versioning on the World Wide Web -- WEBDAV', March 1997, <URL:
  556.    ftp://ftp.ietf.org/internet-drafts/draft-ietf-webdav-protocol-
  557.    03.txt>
  558.  
  559.    [RFC2068] R. Fielding, J. Gettys, J. Mogul, H. Frystyk, T. Berners-
  560.    Lee, 'Hypertext Transfer Protocol -- HTTP/1.1', RFC 2068, January
  561.    1997, <URL:ftp://ds.internic.net/rfc/rfc2068.txt>
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594. Goland & Reddy                                               [Page 10]
  595.  
  596.