What you want to do is possible but only with help of a separate
package to mod_wsgi which doesn't make it necessarily practical at the
moment, especially since there has never been enough interest in the
separate package to make it worthwhile maintaining it.
Graham
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/yooYURHwJmMJ.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to
> modwsgi+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.
>
I experimented with Apache Python bindings with SWIG. Results at:
https://bitbucket.org/grahamdumpleton/apswigpy/wiki/Home
There is a directive in mod_wsgi called:
WSGIPassApacheRequest On
which passes reference to AAA function in mod_wsgi:
http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms
You can then do something like:
import apache.httpd
r = apache.httpd.request_rec(environ['apache.request_rec'])
r.subprocess_env['USER_EMAIL'] = 'asdasads'
The AAA functions though service a specific purpose and can't be
hooked for arbitrary purposes.
You might manage it with allow_access() function so long as that isn't
too early.
The apswigpy isn't really supported as there wasn't any interest in it.
Graham