<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<rfc ipr="full2026" docName="draft-reschke-deltav-computecheckinuri-00">
	<front>
    	<title abbrev="CHECKIN URI in WebDAV versioning">Computing the CHECKIN URI in WebDAV versioning</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>
				<email>julian.reschke@greenbytes.de</email>	
			</address>
		</author>
    <date month="September" year="2001" />
<!--		<workgroup>WEBDAV Working Group</workgroup> -->
        <abstract><t>
In many cases, a versioning-aware client might want to display/include the
URI of the version it's editing while it's being edited. For instance, an
editor might include this as meta information, or the author of a 
document might want to know the URI of the version before it's checked in.
A well-known example is the W3C way of referring to document versions in
recommendations: it contains references to "the current version", to "this version"
and to the "previous version". Something like this is currently impossible
with the current draft version of WebDAV deltaV <xref target="deltaV" />,
as the version URI is determined at the time of CHECKIN.
</t>
		<t>
Distribution of this document is unlimited. Please send comments to the 
WebDAV versioning (delta-V) working group at <eref target="mailto:ietf-dav-versioning@w3.org">ietf-dav-versioning@w3.org</eref>,
which may be joined by sending a message with subject 
"subscribe" to <eref target="mailto:ietf-dav-versioning-request@w3.org?subject=subscribe">ietf-dav-versioning-request@w3.org</eref>.
		</t><t>
Discussions of the delta-V working group are archived at URL: 
<eref target="http://lists.w3.org/Archives/Public/ietf-dav-versioning/">http://lists.w3.org/Archives/Public/ietf-dav-versioning/</eref>.               
       	</t> 
</abstract>
	</front>

	<middle>


<section title="Notational Conventions">
<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>
</section>

<section title="Introduction">
<t>
In many cases, a versioning-aware client might want to display/include the
URI of the version it's editing while it's being edited. For instance, an
editor might include this as meta information, or the author of a 
document might want to know the URI of the version before it's checked in.
A well-known example is the W3C way of referring to document versions in
recommendations: it contains references to "the current version", to "this version"
and to the "previous version". Something like this is currently impossible
with the current draft version of WebDAV deltaV <xref target="deltaV" />,
as the version URI is determined at the time of CHECKIN.
</t>
<t>
  This specification builds on the infrastructure provided by 
  the WebDAV Versioning Protocol, adding support 
	for servers willing to compute an "expected CHECKIN URI" upon CHECKOUT,
  and using this URI at time of CHECKIN.
</t>
</section>


<section title="Changes for CHECKOUT method (when applied to a version-controlled resource)" anchor="METHOD_CHECKOUT">
<t>
	A client may ask for an "expected CHECKIN URI" upon CHECKOUT.
  This is done by placing DAV:compute-expected-checkin-URI as top-level
  element into the request body.
  The server
  is free to either ignore the request, or to return it's best guess about what
  the URI for a version resource created upon CHECKIN would be. 
</t>
<t>
  The client can detect the "expected CHECKIN URI" by parsing the response
  body for a top-level element called DAV:expected-checkin-URI.
</t>

<section title="Example for successful CHECKOUT with computed-checkin-URI">
<figure><preamble>
   >>Request</preamble>
<artwork><![CDATA[
   CHECKOUT /foo.html HTTP/1.1 
   Host: www.webdav.org
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   <D:checkout xmlns:D="DAV:">
     <D:compute-expected-version-URI />
   </D:checkout>
]]></artwork></figure>
<figure><preamble>
   >>Response</preamble>
<artwork><![CDATA[
   HTTP/1.1 200 OK
   Cache-Control: no-cache
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   <D:checkout-response xmlns:D="DAV:">
     <D:expected-version-URI>http://repo.webdav.org/his/23/ver/32</D:expected-version-URI>
   </D:checkout-response>
]]></artwork></figure>
<t>
  In this example, the server was able to compute the "expected CHECKIN URI"
  and returned it in the DAV:expected-version-URI element.
</t>
</section>

<section title="Example for successful CHECKOUT without computed-checkin-URI">
<figure><preamble>
   >>Request</preamble>
<artwork><![CDATA[
   CHECKOUT /foo.html HTTP/1.1 
   Host: www.webdav.org
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   <D:checkout xmlns:D="DAV:">
     <D:compute-expected-version-URI />
   </D:checkout>
]]></artwork></figure>
<figure><preamble>
   >>Response</preamble>
<artwork><![CDATA[
   HTTP/1.1 200 OK
   Cache-Control: no-cache
]]></artwork></figure>
<t>
  In this case, no response body was returned, and thus no "expected CHECKIN URI"
  is available. Simarily, the server may also return
</t>
<figure><preamble>
   >>Response</preamble>
<artwork><![CDATA[
   HTTP/1.1 200 OK
   Cache-Control: no-cache
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxxx

   <D:checkout-response xmlns:D="DAV:">
       ...other content...
   </D:checkout-response>
]]></artwork></figure>
<t>
  where a response body is available, but it doesn't contain the DAV:expected-checkin-URI
  element.
</t>
</section>


</section>

<section title="Changes for CHECKIN method (when applied to a version-controlled resource)" anchor="METHOD_CHECKIN">
<t>
  A client may submit the "expected CHECKIN URI" (obtained during CHECKOUT)
  upon a CHECKIN by placing it into a top-level DAV:expected-checkin-URI
  element in the request body.
  A server may
  <list style="symbols">
    <t>simply ignore the presence of this information or</t>
    <t>use the information and try to checkin the resource using
    the "expected checkin URI" as location for the version resource.
    A failure to create a version resource at the "expected checkin URI"
    MUST cause the operation to fail with a status code of 403 (forbidden)
    and a response body containing the top-level element
    DAV:cannot-assign-expected-version-URI.
    In addition, a server MAY return a new
    "expected checkin URI" in it's response body.
    </t>
  </list>
</t>

<section title="Example for successful CHECKIN with computed-checkin-URI">
<figure><preamble>
   >>Request</preamble>
<artwork><![CDATA[
  CHECKIN /foo.html HTTP/1.1 
  Host: www.webdav.org
  Content-Type: text/xml; charset="utf-8"
  Content-Length: xxxx

  <D:checkin xmlns:D="DAV:">
    <D:expected-version-URI>http://repo.webdav.org/his/23/ver/32</D:expected-version-URI>
  </D:checkin>
]]></artwork></figure>
<figure><preamble>
   >>Response</preamble>
<artwork><![CDATA[
  HTTP/1.1 201 Created
  Location: http://repo.webdav.org/his/23/ver/32
  Cache-Control: no-cache
]]></artwork></figure>
</section>

<section title="Example for failed CHECKIN with computed-checkin-URI">
<figure><preamble>
   >>Request</preamble>
<artwork><![CDATA[
  CHECKIN /foo.html HTTP/1.1 
  Host: www.webdav.org
  Content-Type: text/xml; charset="utf-8"
  Content-Length: xxxx

  <D:checkin xmlns:D="DAV:">
    <D:expected-version-URI>http://repo.webdav.org/his/23/ver/32</D:expected-version-URI>
  </D:checkin>
]]></artwork></figure>
<figure><preamble>
   >>Response</preamble>
<artwork><![CDATA[
  HTTP/1.1 403 Forbidden
  Cache-Control: no-cache
  Content-Type: text/xml; charset="utf-8"
  Content-Length: xxxx

  <D:checkin-response xmlns:D="DAV:">
    <D:cannot-assign-expected-version-URI />
    <D:expected-version-URI>http://repo.webdav.org/his/23/ver/33</D:expected-version-URI>
  </D:checkin-response>
]]></artwork></figure>
</section>


</section>

<section title="Compatibility Considerations">
<t>
  This specification does introduce new protocol elements for the request
  and response bodies for CHECKIN and CHECKOUT.
</t>
<t>
  Clients not aware of this specification will never submit the new
  protocol elements in a request and therefore never will see the new
  response elements.
</t>
<t>
  Servers not aware of this specification will ignore the additional
  two request body elements which is legal behaviour according to this
  protocol (indicating that the protocol extension is not available).
</t>
</section>

<section title="Internationalization Considerations">
<t>
   This proposal builds on <xref target="deltaV" />, and inherits its 
   internationalizability.
</t>
</section>

<section title="IANA Considerations">
<t>
   This proposal does not introduce any new IANA considerations, since 
   it does not specify any new namespaces (in the general sense), but 
   merely uses existing ones.
</t>
</section>

<section title="Copyright">
<t>
To be supplied by the RFC Editor.
</t>
</section>

<section title="Intellectual Property">
<t>
To be supplied by the RFC Editor.
</t>
</section>

    </middle>
	<back>

<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>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>-</email></address></author>
<date month='March' year='1997'></date>
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<t>
      The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL
      NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,  &quot;MAY&quot;, and
      &quot;OPTIONAL&quot; in this document are to be interpreted as described in
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
</reference>


<reference anchor='RFC2518'>

<front>
<title>HTTP Extensions for Distributed Authoring -- WEBDAV</title>
<author initials='Y.' surname='Goland' fullname='Y. Goland'>
<organization></organization></author>
<author initials='E.' surname='Whitehead' fullname='E. Whitehead'>
<organization></organization></author>
<author initials='A.' surname='Faizi' fullname='A. Faizi'>
<organization></organization></author>
<author initials='S.' surname='Carter' fullname='S. Carter'>
<organization></organization></author>
<author initials='D.' surname='Jensen' fullname='D. Jensen'>
<organization></organization></author>
<date month='February' year='1999'></date></front>

<seriesInfo name='RFC' value='2518' />
</reference>

<reference anchor='deltaV' target="http://www.webdav.org/deltav/protocol/draft-ietf-deltav-versioning-17.htm">

<front>
<title>Versioning Extensions to WebDAV</title>
<author initials='G.' surname='Clemm' fullname='G. Clemm'>
<organization></organization></author>
<author initials='J.' surname='Amsden' fullname='J. Amsden'>
<organization></organization></author>
<author initials='T.' surname='Ellison' fullname='T. Ellison'>
<organization></organization></author>
<author initials='C.' surname='Kaler' fullname='C. Kaler'>
<organization></organization></author>
<author initials='J.' surname='Whitehead' fullname='J. Whitehead'>
<organization></organization></author>
<date month='August' year='2001'></date></front>

<seriesInfo name='ID' value='draft-ietf-deltav-versioning-17' />
</reference>
</references>

    </back>
</rfc>

