Python WebDAV server

8 Feb 1999 / Jim Davis
15 Apr 1999 / update status, Larry Masinter

This WebDAV server implements the WebDAV protocol as of draft version 9, in particular it supports the latest form of XML Namespace [as of 2/8/1999].
[ It is not compatible with the WebDAV standard, unfortunately. ]
It is a class 2 server, supporting locking. It also supports MKREF, as defined in the webdav-collection protocol draft of 10 Nov 1998. (But note that this draft is changing quickly, and the support here is out of date.)

The current version is PyDAV 1.1 filestore 1.1

The latest version of the server is running at sandbox.xerox.com:8080

Recent Changes

Legal Notice

Copyright 1997, 1998 by Xerox Incorporated All Rights Reserved.

Permission is hereby granted to store, compile and execute this code for NON-COMMERCIAL purposes. The above copyright notice and this and the following paragraphs must be retained in all the files and in any derivative works.

This code is Xerox research technology and is made available AS IS, and Xerox Corporation makes no representations whatever with respect to the use or execution of this object code. XEROX DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND ALSO INCLUDING WITHOUT LIMITATION ANY EXPRESS OR IMPLIED WARRANTIES OF NON-INFRINGEMENT. NOTWITHSTANDING ANY OTHER PROVISION CONTAINED HEREIN, ANY LIABILITY FOR DAMAGES RESULTING FROM THIS OBJECT CODE OR ITS USE IS EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, TORT (INCLUDING NEGLIGENCE), OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Limitations and bugs in this version

Features

referential resources are supported.

Temp-locked null resources (section 7.4) are supported. The listing returned by GET on a collection includes such resources.

Server supports exclusive write locks, with both Infinite and Seconds timeouts.

DAV:getcontenttype is a writable property. No syntax checking is performed.

Generic architecture: The server implementation has a very clean boundary between the portion that handles WebDAV protocol and the underlying persistent store for resources and properties. Hence it should be possible to move the WebDAV front end to other kinds of stores, e.g. to LDAP, a relational database, etc.

Notes

The rules for determining the content type of a resource are:
  1. If the client has stored a value for DAV:getcontenttype, that value is returned.
  2. If the name of the extension of the file is known to the server (e.g. .html, .gif, etc), then an appropriate MIME type is returned.
  3. Otherwise, text/plain is returned

About the implementation

The server is implemented in Python, and runs on Python 1.4 or later. It runs on Unix and Windows. The persistent store for resources is is a Posix file, properties are stored in a dbm database.

I am trying to carry out Jim's desire to see the source code publically released, but it's taking a while to get to the right folks to make this happen. Please let me know if your need is urgent.

Jim also had a client-side library in Python, and was attempting to release it. This is what he used to test other servers for compliance.

Feedback

Send comments to Larry Masinter and/or Jim Davis.

Installation

  1. Pick a directory for WebDAV's persistent store.
  2. pick a root directory for the resources WebDAV will serve.
  3. Copy webdav.ini.template to webdav.ini
  4. Edit webdav.ini
    1. set working to the persistent store directory
    2. set rootmap to include the root Web directory
    3. optionally, edit port.
    4. You may wish to edit other fields in the ini file.

Running it

  1. python webdav.py
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.