Network Working GroupJ. Reschke
Internet-Draftgreenbytes
Intended status: InformationalOctober 2005
Expires: April 2006

Computing the CHECKIN URI in WebDAV versioning

Status of this Memo

By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress”.

The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt.

The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.

This Internet-Draft will expire in April 2006.

Copyright Notice

Copyright © The Internet Society (2005). All Rights Reserved.

Abstract

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 WebDAV versioning [RFC3253], as the version URI is determined at the time of CHECKIN.

Distribution of this document is unlimited. Please send comments to the WebDAV versioning (delta-V) mailing list at ietf-dav-versioning@w3.org, which may be joined by sending a message with subject "subscribe" to ietf-dav-versioning-request@w3.org. Discussions of the delta-V mailing list are archived at URL: http://lists.w3.org/Archives/Public/ietf-dav-versioning/.



1. Introduction

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 WebDAV versioning [RFC3253], as the version URI is determined at the time of CHECKIN.

This specification builds on the infrastructure provided by the WebDAV Versioning Protocol, adding support for servers willing to compute an "expected version URI" upon CHECKOUT, and using this URI at time of CHECKIN.

This document defines an extension element that could ultimately become part of the WebDAV versioning protocol. Being just an individual submission, it currently defines it in the proprietary namespace

   http://sapportals.com/xmlns/cm/webdav

instead of the "DAV:" namespace. It uses a prefix of "cu:" for referring to elements in this namespace. However, WebDAV server and clients are free to use any prefix, provided that there is a namespace declaration that binds the prefix to the URI of the same namespace.


2. Notational Conventions

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 [RFC2119].


3. Changes for CHECKOUT method

A client may ask for an "expected version URI" upon CHECKOUT (and the CHECKIN variant with DAV:keep-checked-out request element). This is done by placing cu:compute-expected-version-URI as top-level element into the request body.

Additional Marshalling:

3.1. Example for successful CHECKOUT with computed version URI

>>Request

CHECKOUT /foo.html HTTP/1.1 
Host: www.example.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:checkout xmlns:D="DAV:"
  xmlns:cu="http://sapportals.com/xmlns/cm/webdav">
  <cu:compute-expected-version-URI />
</D:checkout>

>>Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:checkout-response xmlns:D="DAV:"
  xmlns:cu="http://sapportals.com/xmlns/cm/webdav">
  <cu:expected-version-URI>
    <D:href>http://repo.example.org/his/23/ver/32</D:href>
  </cu:expected-version-URI>
</D:checkout-response>

In this example, the server was able to compute the "expected version URI" and returned it in the cu:expected-version-URI element.

3.2. Example for successful CHECKOUT without computed version URI

>>Request

CHECKOUT /foo.html HTTP/1.1 
Host: www.example.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:checkout xmlns:D="DAV:"
  xmlns:cu="http://sapportals.com/xmlns/cm/webdav">
  <cu:compute-expected-version-URI />
</D:checkout>

>>Response

HTTP/1.1 200 OK
Cache-Control: no-cache

In this case, no response body was returned, and thus no "expected version URI" is available. Simarily, the server may also return

>>Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:checkout-response xmlns:D="DAV:">
    ...other content...
</D:checkout-response>

where a response body is available, but it doesn't contain the cu:expected-version-URI element.


4. Changes for CHECKIN method (when applied to a version-controlled resource)

A client may submit the "expected version URI" (obtained during CHECKOUT) upon a CHECKIN by placing it into a top-level cu:expected-version-URI element in the request body.

Additional Marshalling:

Additional Preconditions:

4.1. Example for successful CHECKIN with computed version URI

>>Request

CHECKIN /foo.html HTTP/1.1 
Host: www.example.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:checkin xmlns:D="DAV:"
  xmlns:cu="http://sapportals.com/xmlns/cm/webdav">
  <cu:expected-version-URI>
    <D:href>http://repo.example.org/his/23/ver/32</D:href>
  </cu:expected-version-URI>
</D:checkin>

>>Response

HTTP/1.1 201 Created
Location: http://repo.example.org/his/23/ver/32
Cache-Control: no-cache

4.2. Example for failed CHECKIN with computed version URI

>>Request

CHECKIN /foo.html HTTP/1.1 
Host: www.example.org
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:checkin xmlns:D="DAV:"
  xmlns:cu="http://sapportals.com/xmlns/cm/webdav">
  <cu:expected-version-URI>
    <D:href>http://repo.example.org/his/23/ver/32</D:href>
  </cu:expected-version-URI>
</D:checkin>

>>Response

HTTP/1.1 403 Forbidden
Cache-Control: no-cache
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx

<?xml version="1.0" encoding="utf-8" ?>
<D:error xmlns:D="DAV:"
  xmlns:cu="http://sapportals.com/xmlns/cm/webdav">
  <cu:can-assign-expected-version-URI />
  <cu:expected-version-URI>
    <D:href>http://repo.example.org/his/23/ver/33</D:href>
  </cu:expected-version-URI>
</D:error>

Note that 403 (Forbidden) is returned because subsequent request with the same expected version URI will always fail.


5. Compatibility Considerations

This specification does introduce new protocol elements for the request and response bodies for CHECKIN and CHECKOUT.

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.

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).


6. Internationalization Considerations

This proposal builds on [RFC3253], and inherits its internationalizability.


7. IANA Considerations

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.

8. References

[RFC2119]
Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, March 1997.
[RFC2518]
Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. Jensen, “HTTP Extensions for Distributed Authoring -- WEBDAV”, RFC 2518, February 1999.
[RFC3253]
Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. Whitehead, “Versioning Extensions to WebDAV”, RFC 3253, March 2002.

Appendix A. Change Log (to be removed by RFC Editor before publication)

A.1. Since 'draft-reschke-deltav-compute-checkin-uri-00'

Made the document element for responses upon failed CHECKIN DAV:error rather than DAV:checkin-response.
Updated reference to [RFC3253].
Moved extension elements out of DAV: namespace.
Changed examples to explicitly use utf-8 encoding for HTTP content type and XML encoding.
Globally replaced the term "CHECKIN URI" by "version URI"
Added note about how to discover whether the server actually applied the expected version URI.
Made sure artwork (figures) fits into 72 columns.

A.2. Since 'draft-reschke-deltav-compute-checkin-uri-01'

Updated abstract not to refer to DeltaV WG anymore. Use "WebDAV versioning" instead of "deltaV".
Changed descriptions to use RFC3253's Marshalling/Precondition format. Changed name of cu:cannot-assign-expected-version-URI to cu:can-assign-expected-version-URI as this is a precondition.

A.3. Since 'draft-reschke-deltav-compute-checkin-uri-02'

Update marshalling to use DAV:href as container for URIs.
Clarify that the extension applies to CHECKOUT on version resources and to CHECKIN/DAV:keep-checked-out as well.

A.4. Since 'draft-reschke-deltav-compute-checkin-uri-03'

Replaced domain names in examples according to RFC2606: "webdav.org" by "example.org".

A.5. Since 'draft-reschke-deltav-compute-checkin-uri-04'

Remove superfluous IP and copyright sections. Swap "Introduction" and "Notation" sections. Require server to support both extensions to make behaviour more predictable.


Author's Address

Julian F. Reschke
greenbytes GmbH
Hafenweg 16
Muenster, NW 48155
Germany
Phone: +49 251 2807760
Fax: +49 251 2807761
EMail: julian.reschke@greenbytes.de
URI: http://greenbytes.de/tech/webdav/

Full Copyright Statement

Copyright © The Internet Society (2005).

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an “AS IS” basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.