<?xml version="1.0" encoding="UTF-8"?>
<!--
    This XML document is the output of clean-for-DTD.xslt; a tool that strips
    extensions to RFC2629(bis) from documents for processing with xml2rfc.
-->
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<!DOCTYPE rfc
  PUBLIC "" "rfc2629.dtd">
<rfc ipr="full3978" docName="draft-reschke-webdav-post-01" category="std">
	<front>
  <title abbrev="POST to add to WebDAV Collections">Using POST to add Members to Web Distributed Authoring and Versioning (WebDAV) Collections</title>

  <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
    <organization abbrev="greenbytes">greenbytes GmbH</organization>
    <address>
      <postal>
        <street>Hafenweg 16</street>
        <city>Muenster</city><region>NW</region><code>48155</code>
        <country>Germany</country>
      </postal>
      <phone>+49 251 2807760</phone>	
      <email>julian.reschke@greenbytes.de</email>	
      <uri>http://greenbytes.de/tech/webdav/</uri>	
    </address>
  </author>

  <date month="October" year="2008" day="2"/>
  
  <abstract>
    <t>
      The Hypertext Transfer Protocol (HTTP) Extensions for the Web Distributed
      Authoring and Versioning (WebDAV) do not define the behavior for the
      "POST" method when applied to collections, as the base specification
      (HTTP) leaves implementers lots of freedom for the semantics of "POST".
    </t>
    <t>
      This has lead to a situation where many WebDAV servers do not implement
      POST for collections at all, although it is well suited to be
      used for the purpose of adding new members to a collection, where the server
      remains in control of the newly assigned URL. As a matter of fact,
      the Atom Publishing Protocol (AtomPub) uses POST exactly for that purpose.
      On the other hand, WebDAV-based protocols such as the Calendar Extensions 
      to WebDAV (CalDAV) frequently
      require clients to pick a unique URL, although the server could easily
      perform that task.
    </t>
    <t>
      This specification defines a discovery mechanism through which servers
      can advertise support for POST requests with the aforementioned
      "add collection member" semantics.
    </t>
  </abstract>
  
  <note title="Editorial Note (To be removed by RFC Editor before publication)">
    <t>
      Please send comments to the Distributed Authoring and Versioning (WebDAV)
      working group at <eref target="mailto:w3c-dist-auth@w3.org"/>, which may
      be joined by sending a message with subject "subscribe" to
      <eref target="mailto:w3c-dist-auth-request@w3.org"/>.  Discussions of the
      WEBDAV working group are archived at
      <eref target="http://lists.w3.org/Archives/Public/w3c-dist-auth/"/>.
    </t>
    <t>
      Note that although discussion takes place on the WebDAV working
      group's mailing list, this is not a working group document.
    </t>
    <t>
      XML versions, latest edits and the issues list for this document
      are available from <eref target="http://greenbytes.de/tech/webdav/#draft-reschke-webdav-post"/>.
    </t>
  </note>
    
  </front>

	<middle>



<section title="Introduction" anchor="introduction">
  <t>
    The Hypertext Transfer Protocol (HTTP) Extensions for the Web Distributed
    Authoring and Versioning (WebDAV) (<xref target="RFC4918"/>, Section 9.5) do not
    define the behavior for the
    "POST" method when applied to collections, as the base specification
    (HTTP) leaves implementers lots of freedom for the semantics of "POST":
  </t>
  <t><list>
    <t>
      9.5 POST for Collections
    </t>
    <t>
      Since by definition the actual function performed by POST is determined
      by the server and often depends on the particular resource, the behavior
      of POST when applied to collections cannot be meaningfully modified
      because it is largely undefined. Thus, the semantics of POST are
      unmodified when applied to a collection.
    </t>
  </list></t>
  <t>
    This has lead to a situation where many WebDAV servers do not implement
    POST for collections at all, although it is well suited to be
    used for the purpose of adding new members to a collection, where the server
    remains in control of the newly assigned URL. As a matter of fact,
    the Atom Publishing Protocol (AtomPub) uses POST exactly for that purpose
    (<xref target="RFC5023"/>, Section 9.2):
  </t>
  <t><list>
    <t>
      9.2 Creating Resources with POST
    </t>
    <t>
      To add members to a Collection, clients send POST requests to the URI of
      the Collection.
    </t>
  </list></t>
  <t>
    On the other hand, WebDAV-based protocols such as Calendaring Extensions to
    WebDAV (CalDAV) frequently require clients to pick a unique URL, although
    the server could easily perform that task (<xref target="RFC4791"/>, Section 5.3.2):
  </t>
  <t><list>
    <t>
      5.3.2 Creating Calendar Object Resources
    </t>
    <t>
      ...
    </t>
    <t>
      When servers create new resources, it's not hard for the server to choose
      an unmapped URI. It's slightly tougher for clients, because a client
      might not want to examine all resources in the collection and might not
      want to lock the entire collection to ensure that a new resource isn't
      created with a name collision. (...)
    </t>
  </list></t>


<t>
  As a matter of fact, letting the server choose the member URI not only is a 
  simplification for certain types of clients, but can also reduce the complexity
  of the server (in that it doesn't need to persist an additional
  client-supplied identifier where it already has an internal one like
  a UUID or a primary key).
</t>

  <t><list>
    <t>
      Note: the vCard Extensions to WebDAV (CardDAV) (<xref target="draft-ietf-vcarddav-carddav"/>)
      suffer from the same issue, and may be able to take advantage of this
      specification.
    </t>
  </list></t>
  <t>
    This specification defines a discovery mechanism through which servers
    can advertise support for POST requests with the aforementioned
    "add collection member" semantics.
  </t>
  <t><list>
    <t>
      Note: the author previously proposed a new HTTP method for
      exactly this purpose (<xref target="draft-reschke-http-addmember"/>), 
      but quite a few reviewers pointed out that this would duplicate the
      original semantics of POST. Thus this proposal that avoids adding
      a new HTTP method.
    </t>
  </list></t>
</section>
  
<section title="Terminology" anchor="terminology">
<t>
  The terminology used here follows that in the WebDAV specification
  (<xref target="RFC4918"/>).
</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.  In particular:
  <list style="symbols">
    <t>Element names use the namespace "http://purl.org/NET/webdav/post#".  When
    an XML element type in this namespace is referenced in this document outside
    of the context of an XML fragment, the string "p:" will be prefixed to the element name.
    <cref anchor="ns">With sufficient support from the WebDAV WG's former
    mailing list and/or the IESG Applications Area the property defined later
    on could potentially be moved into the DAV: namespace.</cref>
    </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="Protocol Extension">
<t>
  Due to the reasons stated in <xref target="introduction"/>, clients
  can not rely on a specific server behavior when POST is applied to a
  collection. This problem is addressed by this specification by allowing
  servers to advertise a URI that has the desired "add member" semantics.
</t>
<t>
  Note that servers that already use POST for a different purpose can just
  expose a different URI for that purpose. Other servers can just advertise
  the collection's own URI, thus avoiding minting another URI for a limited
  purpose.
</t>

<section title="Definition of 'Add-Member' URI">
<iref item="Add-Member URI"/>

<t>
  The "Add-Member" URI of a WebDAV collection is a URI that will accept
  HTTP POST requests, and will interpret these as requests to store
  the enclosed entity as a new internal member of the collection.
  It MUST identify a resource on the same server as the WebDAV collection
  (the host and port components (<xref target="RFC2616"/>, Section 3.2.2) of the URIs must match).
  
</t>

<t>
  If there are pre-conditions related to creating a resource in the collection
  using a PUT request, then those same pre-conditions apply to the new POST
  request behavior, and the same HTTP response body will returned on failure.
</t>
<t>
  The URI of the newly created resource is returned in the HTTP Location
  response header (<xref target="RFC2616"/>, Section 14.30).
</t>

<t><list>
  <t>
    Note: the fact that a server advertises an "Add-Member" URI
    does not imply any special semantics of the collection itself. For instance,
    member URIs assigned by the server are not necessarily unique over time (a member
    URI may be assigned again to a new resource when it previously was removed).
  </t>
</list></t>

<t><list>
  <t>
    Note: the "Add-Member" URI can be the identical to the collection's 
    URI (in which case the server just advertises the fact that POST to the
    WebDAV collection's URI is supported as defined within this specification).
    But it can also be different from it, in which case it doesn't need to
    have any relation to the collection's URI.
  <figure><preamble>Given a collection URI of </preamble>
<artwork type="example"><![CDATA[
    /docs/collection/
]]></artwork></figure>
  <figure><preamble>all of the URIs below might occur as "Add-Member" URIs:</preamble>
<artwork type="example"><![CDATA[
    /docs/collection/
    /docs/collection/;post
    /docs/collection;post/
    /docs/collection/&post
    /post-service?path=/collection/
]]></artwork></figure></t>
  <t>
    The remainder of the document uses the same format just for reasons
    of consistency; any other HTTP URI would do as well.
  </t>
</list></t>
</section> 

<section title="Discovery">
<section title="p:add-member Property">
<t>
  The p:add-member property is defined on WebDAV collections, and 
  contains the "Add-Member" URI for that collection (embedded inside
  a DAV:href element).
</t>
<figure><artwork type="application/xml-dtd"><![CDATA[
  <!ELEMENT p:add-member (href)>
  <!-- href: defined in [RFC4918], Section 14.7 -->
]]></artwork></figure>

<t>
  A PROPFIND/allprop request SHOULD NOT return this property (see
  <xref target="RFC4918"/>, Section 9.1). Servers
  MUST implement the DAV:supported-live-property-set property defined
  in Section 3.1.4 of <xref target="RFC3253"/>, and report the property
  p:add-member as a supported live property.

</t>
</section>

<section title="Example">
<figure>
<preamble>&gt;&gt;Request</preamble>
<artwork type="message/http: msgtype=&#34;request&#34;" xml:space="preserve"><![CDATA[
PROPFIND /collection/ HTTP/1.1
Host: example.com
Content-Type: application/xml; charset="utf-8"
Content-Length: 163

<?xml version="1.0" encoding="utf-8" ?> 
<propfind xmlns="DAV:" xmlns:p="http://purl.org/NET/webdav/post#">
  <prop>
    <p:add-member/>
  </prop>
</propfind>
]]></artwork>
</figure>
<figure>
<preamble>&gt;&gt;Response</preamble>
<artwork type="message/http: msgtype=&#34;response&#34;" xml:space="preserve"><![CDATA[
HTTP/1.1 207 Multi-Status 
Content-Type: application/xml; charset="utf-8" 
Content-Length: 385
  
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:p="http://purl.org/NET/webdav/post#">
  <response>
    <href>/collection/</href>
    <propstat>
      <prop>
        <p:add-member>
          <href>/collection;add-member/</href>
        </p:add-member>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>]]></artwork>
<postamble>
  Note that in this case, the server has minted a separate URI for the purpose
  of adding new content.
</postamble>
</figure>
</section>

<section title="add-member Link Relation">
<t>
  There may be cases in which it is more efficient to expose the Add-Member URI
  in HTTP headers or in (X)HTML content. For this use case, this specification
  defines a new link relation with the name:
</t>
<figure><artwork type="inline"><![CDATA[
  http://purl.org/NET/webdav/post#add-member
]]></artwork></figure>
<t>
  It can be used both in HTTP Link headers (see <xref target="draft-nottingham-http-link-header"/>):
</t>
<figure>
<preamble>&gt;&gt;Request</preamble>
<artwork type="message/http: msgtype=&#34;request&#34;" xml:space="preserve"><![CDATA[
HEAD /collection/ HTTP/1.1
Host: example.com
]]></artwork></figure>
<figure>
<preamble>&gt;&gt;Response</preamble>
<artwork type="message/http: msgtype=&#34;response&#34;" xml:space="preserve"><![CDATA[
HTTP/1.1 200 OK
Link: </collection;add-member/>;
      rel="http://purl.org/NET/webdav/post#add-member"
]]></artwork></figure>
<t>  
  ...and in (X)HTML content:
</t>
<figure><artwork type="example"><![CDATA[
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>Contents of /collection/</title>
    <link rel="http://purl.org/NET/webdav/post#add-member"
          href="/collection;add-member/" />
  </head
  <body>...</body>
</html>
]]></artwork></figure>
</section>

</section>

<section title="Relation to AtomPub's 'Slug' Header">
<t>
  In the AtomPub protocol, clients can use the entity header "Slug" to
  suggest parts of the URI to be created (see <xref target="RFC5023"/>, Section 9.7). Note that servers are free to ignore
  this suggestion, or to use whatever algorithm that makes sense to
  generate the new URI.
</t>
<t>
  The same applies to the extension defined here: clients can use the
  "Slug" header as by its definition of a generic HTTP header. Servers should
  process it exactly the way defined by AtomPub.
</t>
</section>

<section title="Example Operation">
<figure>
<preamble>&gt;&gt;Request</preamble>
<artwork type="message/http: msgtype=&#34;request&#34;" xml:space="preserve"><![CDATA[
POST /collection;add-member/ HTTP/1.1
Host: example.com
Content-Type: text/plain
Slug: Sample Text
Content-Length: 12

Sample text.
]]></artwork>
</figure>
<figure>
<preamble>&gt;&gt;Response</preamble>
<artwork type="message/http: msgtype=&#34;response&#34;" xml:space="preserve"><![CDATA[
HTTP/1.1 201 Created
Location: http://example.com/collection/sample%20text
]]></artwork>
</figure>
</section>
</section>



<section title="Additional Semantics for existing Methods">
<t>
  One important use case for this specification are collections that act
  as WebDAV collections for the purpose of read access (PROPFIND Depth 1/Infinity),
  but which only support internal member URIs assigned by the server.
  These collections will not allow a client to create a new member using
  methods like PUT, MKCOL, LOCK, COPY or MOVE. Therefore, this specification
  defines a new precondition name (<xref target="RFC4918"/>, Section 16)
  that can be used to provide the client with additional information about
  why exactly the request failed.
</t>
<section title="Additional Preconditions">
   <iref item="PUT method" subitem="Additional Preconditions"/>
   <iref item="MKCOL method" subitem="Additional Preconditions"/>
   <iref item="LOCK method" subitem="Additional Preconditions"/>
   <iref item="MOVE method" subitem="Additional Preconditions"/>
   <iref item="COPY method" subitem="Additional Preconditions"/>
<t>
  <iref item="p:allow-client-defined-URI" primary="true"/>
  <iref item="Condition Names" subitem="p:allow-client-defined-URI (pre)" primary="true"/>
  (p:allow-client-defined-URI): the server allows clients to specify
  the last path segment for newly created resources.
</t>
<t>
  The precondition element MAY contain a p:add-member-uri
  XML element specifying the "Add-Member" URI associated with the collection,
  on which the creation of a new child resource was attempted:
</t>
<figure><artwork type="application/xml-dtd"><![CDATA[
  <!ELEMENT p:allow-client-defined-uri (p:add-member?)>
]]></artwork></figure>
</section>

<section title="Example: Failed PUT Request">
<t>
  In this example, the client tries to use PUT to create a new internal
  member of /collection/.
</t>
<figure>
<preamble>&gt;&gt;Request</preamble>
<artwork type="message/http: msgtype=&#34;request&#34;" xml:space="preserve"><![CDATA[
PUT /collection/new.txt HTTP/1.1
Host: example.com
Content-Type: text/plain
Content-Length: 12

Sample text.
]]></artwork></figure>
<figure>
<preamble>&gt;&gt;Response</preamble>
<artwork type="message/http: msgtype=&#34;response&#34;" xml:space="preserve"><![CDATA[
HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD, TRACE, PROPFIND, COPY, MOVE
Content-Type: application/xml; charset=UTF-8
Content-Length: 223

<error xmlns="DAV:" xmlns:p="http://purl.org/NET/webdav/post#">
  <p:allow-client-defined-uri>
    <p:add-member>
      <href>/collection;add-member/</href>
    </p:add-member>
  </p:allow-client-defined-uri>
</error>
]]></artwork></figure>
<t>
  The request fails with a 405 (Method Not Allowed) status, but also provides
  the reason, and a pointer to the "Add-Member" URI in the response body.
</t>
</section>
</section>




<section title="Relationship to WebDAV Access Control Protocol">
<t>
  The WebDAV ACL specification requires the DAV:bind privilege to be granted
  on a collection for the client to able add new collection members (<xref target="RFC3744"/>, Section 3.9). Consistent with that, a server
  MUST reject a POST request to the Add-Member URI of a collection unless
  the authenticated principal is granted DAV:bind privilege on the associated
  WebDAV collection resource.
</t>
</section>

  
<section title="Internationalization Considerations" anchor="internationalization.considerations">
<t>
  This document does not introduce any new internationalization considerations
  beyond those discussed in Section 20 of <xref target="RFC4918"/>.
</t>
</section>

<section title="IANA Considerations">
<t>
  This specification does not require any actions from IANA.
</t>
</section>
  
<section title="Security Considerations" anchor="security.considerations">

<t>
  All security considerations connected to HTTP/WebDAV and XML apply for
  this specification as well, namely, <xref target="RFC4918"/> (Section 20)
  and <xref target="RFC3470"/> (Section 7).
</t>
<t>
  Furthermore, servers should be aware that deriving the member path from the
  data being stored in the resource could potentially expose confidential
  information. This could even be the case when only a hash code of the
  content is used.
</t>
<t>
  In addition, on servers that do not support this specification, a malevolent
  user could set the p:add-member URI as a custom property, tricking other
  users to post content to an entirely different URI. Clients can protect
  themselves against this scenario by
  <list style="symbols">
    <t>not following p:add-member URIs to different servers, and/or</t>
    <t>verifying that the p:add-member property is indeed a live property (this
    can be achieved by testing the DAV:supported-live-property-set property, or
    by checking whether p:add-member is returned upon PROPFIND/allprop)</t>
  </list>
</t>
</section>


<section title="Acknowledgements">
<t>
  This document has benefited from thoughtful discussion by Cyrus Daboo and
  Bernard Desruissaux.
</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="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>

<reference anchor="RFC3253">
  <front>
    <title>Versioning Extensions to WebDAV</title>
    <author initials="G." surname="Clemm" fullname="G. Clemm">
      <organization>Rational Software</organization>
      <address><email>geoffrey.clemm@rational.com</email></address>
    </author>
    <author initials="J." surname="Amsden" fullname="J. Amsden">
      <organization>IBM</organization>
      <address><email>jamsden@us.ibm.com</email></address>
    </author>
    <author initials="T." surname="Ellison" fullname="T. Ellison">
      <organization>IBM</organization>
      <address><email>tim_ellison@uk.ibm.com</email></address>
    </author>
    <author initials="C." surname="Kaler" fullname="C. Kaler">
      <organization>Microsoft</organization>
      <address><email>ckaler@microsoft.com</email></address>
    </author>
    <author initials="J." surname="Whitehead" fullname="J. Whitehead">
      <organization>UC Santa Cruz, Dept. of Computer Science</organization>
      <address><email>ejw@cse.ucsc.edu</email></address>
    </author>
    <date month="March" year="2002"/>
  </front>
  <seriesInfo name="RFC" value="3253"/>
</reference>

<reference anchor="RFC3744">
    <front>
      <title abbrev="WebDAV Access Control Protocol">Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol</title>
      <author initials="G." surname="Clemm" fullname="Geoffrey Clemm">
        <organization>IBM</organization>
        <address>
          <postal>
            <street>20 Maguire Road</street>
            <city>Lexington</city>
            <region>MA</region>
            <code>02421</code>
          </postal>
          <email>geoffrey.clemm@us.ibm.com</email>
        </address>
      </author>
      <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>
          <email>julian.reschke@greenbytes.de</email>
        </address>
      </author>
      <author initials="E." surname="Sedlar" fullname="Eric Sedlar">
        <organization>Oracle Corporation</organization>
        <address>
          <postal>
            <street>500 Oracle Parkway</street>
            <city>Redwood Shores</city>
            <region>CA</region>
            <code>94065</code>
          </postal>
          <email>eric.sedlar@oracle.com</email>
        </address>
      </author>
      <author initials="J." surname="Whitehead" fullname="Jim Whitehead">
        <organization abbrev="U.C. Santa Cruz">U.C. Santa Cruz, Dept. of Computer Science</organization>
        <address>
          <postal>
            <street>1156 High Street</street>
            <city>Santa Cruz</city>
            <region>CA</region>
            <code>95064</code>
          </postal>
          <email>ejw@cse.ucsc.edu</email>
        </address>
      </author>
      <date month="May" year="2004"/>
    </front>
    <seriesInfo name="RFC" value="3744"/>
  </reference>

  <reference anchor="XML" target="http://www.w3.org/TR/2006/REC-xml-20060816">
    <front>
      <title>Extensible Markup Language (XML) 1.0 (Fourth 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="16" month="August" year="2006"/>
    </front>
    <seriesInfo name="W3C" value="REC-xml-20060816"/>
  </reference>
<!--
  <reference anchor="RFC3986">
    <front>
      <title abbrev="URI Generic Syntax">Uniform Resource Identifier (URI): Generic Syntax</title>
      <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
        <organization abbrev="W3C/MIT">World Wide Web Consortium</organization>
        <address>
          <email>timbl@w3.org</email>
        </address>
      </author>
      <author initials="R." surname="Fielding" fullname="Roy T. Fielding">
        <organization abbrev="Day Software">Day Software</organization>
        <address>
          <email>fielding@gbiv.com</email>
        </address>
      </author>
      <author initials="L." surname="Masinter" fullname="Larry Masinter">
        <organization abbrev="Adobe">Adobe Systems Incorporated</organization>
        <address>
          <email>LMM@acm.org</email>
        </address>
      </author>
      <date month="January" year="2005"/>
    </front>
    <seriesInfo name="STD" value="66"/>
    <seriesInfo name="RFC" value="3986"/>
  </reference>-->

  <reference anchor="RFC4918">
    <front>
      <title>HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</title>
      <author initials="L." surname="Dusseault" fullname="Lisa Dusseault" role="editor">
        <organization>CommerceNet</organization>
        <address>
          <postal>
            <street>2064 Edgewood Dr.</street>
            <city>Palo Alto</city> <region>CA</region> <code>94303</code>
            <country>US</country>
          </postal>
          <email>ldusseault@commerce.net</email>
        </address>
      </author>
      <date month="June" year="2007"/>
    </front>
    <seriesInfo name="RFC" value="4918"/>
  </reference>
  
  <reference anchor="draft-nottingham-http-link-header">
    <front>
      <title>HTTP Header Linking</title>
      <author initials="M." surname="Nottingham" fullname="Mark Nottingham">
        <organization/>
        <address>
          <email>mnot@mnot.net</email>
        </address>
      </author>
      <date month="July" day="2" year="2008"/>
    </front>

    <seriesInfo name="Internet-Draft" value="draft-nottingham-http-link-header-02"/>
  </reference>

</references>
<references title="Informative References">

  <reference anchor="RFC3470">
  <front>
    <title abbrev="XML Within IETF Protocols">
     Guidelines for the Use of Extensible Markup Language (XML) within IETF Protocols</title>
    
    <author initials="S." surname="Hollenbeck" fullname="Scott Hollenbeck">
      <organization>VeriSign, Inc.</organization>
      <address>
        <email>shollenbeck@verisign.com</email>
      </address>
    </author>
    
    <author initials="M." surname="Rose" fullname="Marshall T. Rose">
      <organization>Dover Beach Consulting, Inc.</organization>
      <address>
        <email>mrose@dbc.mtview.ca.us</email>
      </address>
    </author>
    
    <author initials="L." surname="Masinter" fullname="Larry Masinter">
      <organization>Adobe Systems Incorporated</organization>
      <address>
        <email>LMM@acm.org</email>
      </address>
    </author>
    
    <date year="2003" month="January" day="23"/>
    </front>
    <seriesInfo name="RFC" value="3470"/>
    <seriesInfo name="BCP" value="70"/>
  </reference>

  <reference anchor="RFC4791">
    <front>
      <title abbrev="CalDAV">Calendaring Extensions to WebDAV (CalDAV)</title>
      <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
        <organization abbrev="Apple">Apple Inc.</organization>
        <address>
          <email>cyrus@daboo.name</email>
        </address>
      </author>
      <author initials="B." surname="Desruisseaux" fullname="Bernard Desruisseaux">
        <organization abbrev="Oracle">Oracle Corporation</organization>
        <address>
          <email>bernard.desruisseaux@oracle.com</email>
        </address>
      </author>
      <author initials="L.M." surname="Dusseault" fullname="Lisa Dusseault">
        <organization abbrev="CommerceNet">CommerceNet</organization>
        <address>
          <email>ldusseault@commerce.net</email>
        </address>
      </author>
      <date month="March" year="2007"/>
    </front>
    <seriesInfo name="RFC" value="4791"/>
  </reference>

  <reference anchor="RFC5023">
    <front>
      <title>The Atom Publishing Protocol</title>
      <author initials="J." surname="Gregorio" fullname="J. Gregorio">
        <organization>Google</organization>
        <address>
          <email>joe@bitworking.org</email>
        </address>
      </author>
      <author initials="B." surname="de hOra" fullname="B. de hOra">
        <organization>NewBay Software</organization>
        <address>
          <email>bill@dehora.net</email>
        </address>
      </author>
      <date year="2007" month="October"/>
    </front>
    <seriesInfo name="RFC" value="5023"/>
  </reference>

  <reference anchor="draft-reschke-http-addmember">
  	<front>
      <title>The HTTP ADDMEMBER Method</title>
      <author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
        <organization abbrev="greenbytes">greenbytes GmbH</organization>
        <address>
          <email>julian.reschke@greenbytes.de</email>	
        </address>
      </author>
      <date month="February" year="2005"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-reschke-http-addmember-00"/>
  </reference>
  
  <reference anchor="draft-ietf-vcarddav-carddav">
    <front>
      <title>vCard Extensions to WebDAV (CardDAV)</title>
      <author initials="C." surname="Daboo" fullname="Cyrus Daboo">
        <organization>Apple Inc.</organization>
        <address>
          <email>cyrus@daboo.name</email>	
        </address>
      </author>
      <date month="July" year="2008"/>
    </front>
    <seriesInfo name="Internet-Draft" value="draft-ietf-vcarddav-carddav-01"/>
  </reference>

</references>
  

<section title="Change Log (to be removed by RFC Editor before publication)">
<section title="since draft-reschke-webdav-post-00">
<t>
  Added Acknowledgements.
</t>
<t>
  Add and resolve issues "acl",
  "forbidden-put",
  "member-uri-content",
  "post-error-semantics",
  "property-trust",
  "rational-server-uri", 
  ""remote-uri",
  "uri-format" and
  "uri-uniqueness".
</t>
</section>
</section>


  <section title="Resolved issues (to be removed by RFC Editor before publication)"><t>
          Issues that were either rejected or resolved in this version of this
          document.
        </t><section title="rational-server-uri"><t>
        In Section 1:
      </t><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0060.html&gt;</t><t>cyrus@daboo.name (2008-09-22): 
One thing this reminds me of: another reason why this POST may be needed is 
if the server enforces a particular naming scheme on members. e.g., a 
CalDAV server may require that all member path segments match the UID in 
the calendar data, or match a record-id in its data store etc. In this case 
the add-member behavior is required. So its not just the case of "the 
client doesn't care to name members itself", but also this other one. 
Probably worth adding a comment on this.
  </t><t>Resolution (2009-09-23): 
    Mention that this can simplify the server by not having to persist a 
    client-supplied name.
  </t></section><section title="remote-uri"><t>
        In Section 3.1:
      </t><t>
      Type: change</t><t>julian.reschke@greenbytes.de (2008-09-30): 
    Explicitly forbid Add-Member URIs pointing to other servers, mainly for
    reasons of security (DOS), but also for practical reasons (authentication).
  </t><t>Resolution (2008-10-01): 
    Require that the "Add-Member" URI points to the same server.
  </t></section><section title="post-error-semantics"><t>
        In Section 3.1:
      </t><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0058.html&gt;</t><t>cyrus@daboo.name (2008-09-22): 
    Something needs to be stated about error handling: e.g., "If there are
    pre-conditions related to creating a resource in the collection using a PUT
    request, then those same pre-conditions apply to the new POST request
    behavior, and the same DAV:error response body returned on failure". This
    would be a "catch-all" to allow protocols such as CalDAV, which restrict
    certain aspects of the data stored in collections, to simply return the
    same pre-condition failure information for POST as for PUT. 
  </t><t>Resolution (2009-09-23): 
    Adopt most of the proposed text, except for saying "HTTP response"
    to make it more generic (for instance, there may be no DAV:error entity
    body involved).
  </t></section><section title="uri-uniqueness"><t>
        In Section 3.1:
      </t><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0058.html&gt;</t><t>cyrus@daboo.name (2008-09-22): 
    Is the server allowed to re-use new member URIs? i.e. /a/b.txt exists at
    some point, then is deleted. Is the server then allowed to use b.txt as a
    new member of /a/, or does the new member path segment have to be unique
    for the entire existence of that collection? If the member path segment is
    expected to be unique there should be some guidance to servers on how they
    might implement that (uuid's for instance). 
  </t><t>Resolution (2009-09-23): 
    Clarified that this specification doesn't make any additional requirements
    on the collection semantics.
  </t></section><section title="uri-format"><t>
        In Section 3.1:
      </t><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0063.html&gt;</t><t>cyrus@daboo.name (2008-09-23): 
Another question: there is no restriction on what p:add-member URI can be? 
e.g. if I have the collection "/a/b/" can the p:add-member be another 
resource entirely, e.g. "/a/use-c-to-create-in-b/"? If this is possible it 
should be called out, as the behavior might be somewhat unexpected for 
clients. It might even be the case that the p:add-member URI is on a 
different server (e.g. new member items in a collection need "approval" 
from some other service). The interaction with WebDAV ACL in this case 
would need to be clear - i.e. what privileges are required on the 
p:add-member URI?
  </t><t>Resolution (2008-09-30): 
    Add a set of examples, and use "/collection;add-member/" in subsequent examples.
  </t></section><section title="property-trust"><t>
        In Section 3.2.1:
      </t><t>
      Type: change</t><t>julian.reschke@greenbytes.de (2008-10-01): 
    An attacker could set p:add-member as dead property and thus trick clients
    into POSTing new content somewhere else.
  </t><t>Resolution (2008-10-01): 
    (1) Require server support for DAV:supported-live-property-set; (2) mention
    issue in security considerations.
  </t></section><section title="forbidden-put"><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0063.html&gt;</t><t>cyrus@daboo.name (2008-09-23): 
So one option for the server to enforce its naming scheme would be to 
require POST by the client to create new resources rather than allowing 
PUT/COPY/MOVE to do so. However there is no way fort a client to discover 
that such a restriction might be in place other than getting a 403. How 
about a new pre-condition code for that so that the server can indicate 
"DAV:only-post-allowed-to-create-new-members" to the client? With perhaps a 
more compact name!
  </t><t>Resolution (2008-09-30): 
    Mention the use case, define the precondition, add example.
  </t></section><section title="acl"><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0063.html&gt;</t><t>cyrus@daboo.name (2008-09-23): 
This brings up another question: presumably the DAV:bind privilege is 
required on the collection for the new POST ;add-member behavior to be 
allowed (just as it would be required for PUT creating a new member). I 
think we therefore need a statement in Security Considerations:
"When a server supports WebDAV ACL [RFC3744], the DAV:bind privilege is 
required to be granted on the collection resource in which the new member 
resource is being created. If this privilege is denied or not present, the 
POST request MUST fail."
  </t><t>Resolution (2008-09-25): 
    Add "relation to ACL" section; required DAV:bind privilege on associated
    WebDAV collection.
  </t></section><section title="member-uri-content"><t>
        In Section 8:
      </t><t>
      Type: change</t><t>&lt;http://lists.w3.org/Archives/Public/w3c-dist-auth/2008JulSep/0058.html&gt;</t><t>cyrus@daboo.name (2008-09-22): 
Security consideration: "Servers MUST NOT derive the member path segment from the data being stored in the resource". This is important because you don't want server's leaking information in the URI that would not otherwise be visible (e.g. a user can PROPFIND the members but cannot read the content of the members - leaking content in the URI would be bad). Note this impacts how the server generates the member path segment. e.g. an md5 hash of the data only may not be appropriate.
  </t><t>Resolution (2009-09-23): 
    State the problem, but do not make a requirement (for instance, the
    server could be entirely public in which case this wouldn't be an issue
    at all).
  </t></section></section><section title="Open issues (to be removed by RFC Editor prior to publication)"><section title="edit"><t>
      Type: edit</t><t>julian.reschke@greenbytes.de (2008-09-22): 
    Umbrella issue for editorial fixes/enhancements.
  </t></section></section></back>
  
</rfc>