[mod_python] Conditional handlers?

Joao S. O. Bueno gwidion at mpc.com.br
Mon Feb 2 18:21:34 EST 2004


Michael C. Neel escreveu:
> You can return apache.DECLINED, which tells apache your handler declines
> processing this request and to go onto the next.
> 
> In the case of an AuthenHandler, I would just simply check the request
> type and if a POST check the user, otherwise return an apache.OK
> 
> These are for straight handlers, I do not know if these work in the
> publisher handler - I've never used it.
> 
> Mike

Actually, you can have an starigfht handler for authentication and the 
publisher for the main section. I am using it this way.
LAs, I also have conditional handlers on the very same app. - I use
  req.add_handler ("PythonHandler","mod_python.publisher")
therefore, the actuall application is reached only if authencation 
suceeds, else, it is directed to a dummy handler.


> 
> 
>>-----Original Message-----
>>From: Jesse Lawrence [mailto:lawrence_jesse at yahoo.ca] 
>>Sent: Monday, February 02, 2004 2:28 PM
>>To: mod_python at modpython.org
>>Subject: [mod_python] Conditional handlers?
>>
>>
>>Hello everyone,
>>
>>Is there a way of doing conditional handlers, for
>>instance, using the PythonAuthenHandler only if the
>>request uses the HTTP POST method?
>>
>>Thanks,
>>
>>Jesse Lawrence
>>
>>______________________________________________________________
>>________ 
>>Post your free ad now! http://personals.yahoo.ca
>>_______________________________________________
>>Mod_python mailing list
>>Mod_python at modpython.org
>>http://mailman.modpython.org/mailman/listinfo/mod_python
>>
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
> 
> 




More information about the Mod_python mailing list