wsgidav.server.ext_wsgiutils_server

Description

ext_wsgiutils_server.py is an extension of the wsgiutils server in Paste. It supports passing all of the HTTP and WebDAV (rfc 2518) methods.

It includes code from the following sources: wsgiServer.py from wsgiKit <http://www.owlfish.com/software/wsgiutils/> under PSF license, wsgiutils_server.py from Paste <http://pythonpaste.org> under PSF license, flexible handler method <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307618> under public domain.

Running as standalone server

To run as a standalone server using the bundled ext_wsgiutils_server.py:

usage: python ext_wsgiutils_server.py [options] [config-file]

config-file:
  The configuration file for WsgiDAV. if omitted, the application
  will look for a file named 'WsgiDAV.conf' in the current directory

options:
  --port=PORT  Port to serve on (default: 8080)
  --host=HOST  Host to serve from (default: localhost, which is only
                    accessible from the local computer; use 0.0.0.0 to make your
                    application public)
  -h, --help   show this help message and exit

Running using other web servers

To run it with other WSGI web servers, you can:

from wsgidav.mainappwrapper import PyFileApp
publish_app = PyFileApp('WsgiDAV.conf')
# construct the application with configuration file
# if configuration file is omitted, the application
# will look for a file named 'WsgiDAV.conf'
# in the current directory

where publish_app is the WSGI application to be run, it will be called with publish_app(environ, start_response) for each incoming request, as described in WSGI

Note: if you are using the paster development server (from Paste <http://pythonpaste.org>), you can copy ext_wsgi_server.py to <Paste-installation>/paste/servers and use this server to run the application by specifying server='ext_wsgiutils' in the server.conf or appropriate paste configuration.

Classes

ExtHandler(request, client_address, server)
ExtServer(serverAddress, wsgiApplications[, …])

Functions

serve(conf, app)

Other Members

BaseHTTPServer
SERVER_ERROR str(object=’‘) -> string
compat Tool functions to support Python 2 and 3.
http_client
logging Logging package for Python.
socket This module provides socket operations and some related functions.
socketserver
sys This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter.
threading Thread module emulating a subset of Java’s threading model.
time This module provides various functions to manipulate time values.
traceback Extract, format and print information about Python stack traces.
util Miscellaneous support functions for WsgiDAV.