[mod_python] Calling APR optional functions provided by modules

Deron Meranda deron.meranda at gmail.com
Wed Nov 23 13:17:26 EST 2005

Has anyone given any thought about how to allow mod_python
to lookup and call optional functions from other modules?

This could be important for instance when writing an authentication
or authorization handler which needs to determine SSL properties (even if
to just answer the simple question: is the connection SSL encrypted).  The
normal way of looking in the subprocess_env for SSL_* variables does not
work in those early phases because those variables are not set until the
main handler phase.

The mod_ssl module though does provide both a ssl_is_https() and
ssl_var_lookup() optional functions which can be used in earlier
phases.  For example look at how mod_rewrite calls those; using

I can see how it might be very hard to support optional functions in
general because of the C type linkage issue, but perhaps a select few
could be coded directly into mod_python.
Deron Meranda

More information about the Mod_python mailing list