WebDAV: Distributed Authoring and Versioning on the Web

Robert D. Cameron
March 7, 2003

WebDAV: Distributed Authoring and Versioning on the Web

WebDAV extends HTTP with two additional functionalities.

Distributed authoring.
This supports write-only access to documents and document collections on the web. Reference: HTTP Extensions for Distributed Authoring, RFC 2518, February 1999.
Document/collection versioning.
Supports version control for writable document collections. Reference: Versioning Extensions to WebDAV, RFC 3253, March 2002.

I. Beyond the Read-Only Web: Distributed Authoring

The classical web accessed through HTTP typically operates as a distributed read-only filesystem, even though PUT and DELETE methods are part of HTTP.

WebDAV distributed authoring provides four facilities.

Overwrite Protection through Locking

Exclusive Locks

Exclusive locks allow an individual principal to obtain exclusive access to a resource. With an exclusive write lock, only one principal may work on a resource at a time, preventing conflicting modifications by separate principals.

Typical process:

  1. Lock a resource exclusively.
  2. Download the resource for editing.
  3. Perform the edits.
  4. Upload the resource when completed.
  5. Release the exclusive lock.

Shared Locks

Exclusive locks may be too rigid.

WebDAV also supports shared locks. Shared locks permit a group of principals to share access to a locked resource.

Lock Tokens

WebDAV locks are represented by permanently unique lock tokens. Uniqueness is required to prevent confusion across resources and servers.

Lock tokens are created and returned by the LOCK method (an extended HTTP method).

If-Request Header

In order for a locked resource to be operated on, the lock token must be provided in the If-Request header of the HTTP or WebDAV request.

Collections

WebDAV defines a notion of collection as a set of web resources that may be indentified and processed as a single unit. In essence, a collection is denoted by a base URL for the collection, and consists of all actual URLs that are extensions of this base.

Authors may manipulate collection structure independently of server-side file hierarchies.

Properties

WebDAV defines a notion of separately-maintained properties associated with documents or document collections.

Properties of a document or collection are sets of name-value pairs. Values are expressed as XML fragments.

Standard properties include creation date, content length, content type, last modified date and other file attributes. User-defined properties are also possible.

The PROPFIND and PROPPATCH methods are used to retrieve and update properties respectively. PROPFIND with the "propname" property returns a list of all defined property names associated with a resource (property browsing).

Live Properties

Live properties are those that are maintained by the server. For example, the DAV:getcontentlength property is the actual length of a returned resource as would be returned in response to a HTTP GET request. Dead properties are those that are manually maintained.

II. Distributed Versioning

Versioning allows the maintenance of separately named versions of resources.

Versioning concepts: