On 08/22/2012 01:31 AM, Adi Selitzky wrote:
Hi!
I am writing my own module that handles all incoming requests. In some cases, I
want this request to be handled by mod_python which I installed. In these
cases, my module should change the requested file extension to .py, which is
configured to be handled by mod_python.
AddHandler mod_python .py
I have tow questions:
1. How can I set the modules order, so my module will handle the request first,
change its url, and then mod_python will handle it?
2. Which field in the request_rec I should change so it will take effect? I
tried to change the URL key in subprocess_env table, but the request was not
handled by mod_python.
apr_table_set(r->subprocess_env, "URL", strUriWithPyAtTheEnd);
Thanks
Perhaps you should simply use an early hook (e.g.
"ap_hook_translate_name" should work if you are already using the
translate hook) and set r->handler to "mod_python", regardless of the
extension?
Joe
--
http://www.silverhawk.net/