Module modpy
source code
Wrapper for mod_python, for use as a CherryPy HTTP server.
To autostart modpython, the "apache" executable or script
must be on your system path, or you must override the global APACHE_PATH.
On some platforms, "apache" may be called "apachectl"
or "apache2ctl"-- create a symlink to them if needed.
If you wish to use the WSGI interface instead of our _cpmodpy
interface, you also need the 'modpython_gateway' module at:
http://projects.amor.org/misc/wiki/ModPythonGateway
KNOWN BUGS
-
Apache processes Range headers automatically; CherryPy's
truncated output is then truncated again by Apache. See
test_core.testRanges. This was worked around in
http://www.cherrypy.org/changeset/1319.
-
Apache does not allow custom HTTP methods like CONNECT as per
the spec. See test_core.testHTTPMethods.
-
Max request header and body settings do not work with
Apache.
-
Apache replaces status "reason phrases" automatically.
For example, CherryPy may set "304 Not modified" but
Apache will write out "304 Not Modified" (capital
"M").
-
Apache does not allow custom error codes as per the spec.
-
Apache (or perhaps modpython, or modpython_gateway) unquotes %xx
in the Request-URI too early.
-
mod_python will not read request bodies which use the
"chunked" transfer-coding (it passes
REQUEST_CHUNKED_ERROR to ap_setup_client_block instead of
REQUEST_CHUNKED_DECHUNK, see Apache2's http_protocol.c and
mod_python's requestobject.c).
|
|
|
|
|
stop()
Gracefully shutdown a server that is serving forever. |
source code
|
|
|
|
|
curdir = ' /build/buildd/cherrypy3-3.0.2/cherrypy/test '
|
|
APACHE_PATH = ' apache '
|
|
CONF_PATH = ' test_mp.conf '
|
|
conf_modpython_gateway = ' \n# Apache2 server conf file for tes ...
|
|
conf_cpmodpy = ' \n# Apache2 server conf file for testing Cherr ...
|
|
loaded = False
|
conf_modpython_gateway
- Value:
'''
# Apache2 server conf file for testing CherryPy with modpython_gateway
.
DocumentRoot "/"
Listen %s
LoadModule python_module modules/mod_python.so
...
|
|
conf_cpmodpy
- Value:
'''
# Apache2 server conf file for testing CherryPy with _cpmodpy.
DocumentRoot "/"
Listen %s
LoadModule python_module modules/mod_python.so
SetHandler python-program
...
|
|