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
- 8 Feb 999: bug fixes. Reports errors arising from parsing XML. LOCK method allows Timeout header to be omitted, and complains if no body.
- 29 Jan 1999: bug fix. Store the creationdate of a redirect reference in the property store explicitly since there is nothing in the file system from which we can get it.
- 28 Jan 1999: Bug fixes.
- PROPFIND on collection fails if it contains a redirect resource.
- server crashes if Host header contains more than one colon.
- PROPFIND on references failed in some cases
- 21 Jan 1999: DELETE no longer allows DELETE of root. Server now handles excpetions when file is read-only in the file system. Fixed obscure bugs having to do with inheriting locks from parents.
- 19 Dec 1998: DELETE of a resource now deletes its properties, too. Directory listing (GET of a collection) now shows lock status, if any.
- 11 Dec 1998: internal bugs fixes
- 4 Dec 1998: support MKREF. Both direct and redirect references are supported
- 27 Nov 1998: PUT no longer stores application/octet-stream as default Content-Type if none is provided. Instead, it does nothing.
- 24 Nov 1998: bug fixes. HTTP headers now have CRLF, not just LF. PUT no longer requires a Content-Type (It's still a good idea to provide one.). Thanks to Joe Orton for bug reports.
- 23 Nov 1998: fixed bug in HEAD
- 19 Nov 1998: supports xml:lang attribute
- 16 Nov 1998: fixed ISO 8601 times to have colons. Now accepts application/xml as well as text/xml, no longer is offended by MIME parameters. Fix bug where unsupported methods got stack trace.
- 16 Nov 1998: fixed OPTIONS response to be list of compliance classes. Got rid of 401 responses, since no authentication is supported yet.
- 15 Nov 1998: first version.
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
- No authentication whatsoever.
- No support for Etags.
- No lock refreshing.
- The opaque lock tokens are non-standard (just time stamps)
- No UTF-16 support.
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:
- If the client has stored a value for DAV:getcontenttype, that value is returned.
- 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.
- 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
- Pick a directory for WebDAV's persistent store.
- pick a root directory for the resources WebDAV will serve.
- Copy webdav.ini.template to webdav.ini
- Edit webdav.ini
- set working to the persistent store directory
- set rootmap to include the root Web directory
- optionally, edit port.
- You may wish to edit other fields in the ini file.
Running it
- python webdav.py
gipoco.com
is neither affiliated with the authors of this page or responsible
for its contents. This is a safe-cache copy of the original web site.
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.