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
|
|
|
Functions
|
Other Members
|
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |