Apache Mod-Python - Re: How mod_python treats apache.OK/apache.DECLINED response from

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > February 2006 > Re: How mod_python treats apache.OK/apache.DECLINED response from





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: How mod_python treats apache.OK/apache.DECLINED response from
Jim Gallacher

2006-02-19, 5:45 pm

Graham Dumpleton wrote:
>
> On 19/02/2006, at 3:24 PM, Graham Dumpleton wrote:
>
>
>
> Hmmm, adding a stacked handler probably only makes sense for the current
> phase. Thus, perhaps just:
>
> def all(req):
> req.add_stacked_handler("page::header")
> req.add_stacked_handler("page::body")
> req.add_stacked_handler("page::footer")
> return apache.OK
>
> or if overloading is allowed:
>
> def all(req):
> req.add_handler(None,"page::header")
> req.add_handler(None,"page::body")
> req.add_handler(None,"page::footer")
> return apache.OK
>
> That no phase is listed means the current phase is used and it would be
> stacked.
>
> Too obscure???


Yes. There is a little too much magic there.

> If you allowed an independent handler stack to be added, maybe you need to
> allow a list as an alternative of just the handler string.
>
> def all(req):
> req.add_handler("PythonHandler",
> ["page::header","page::body","page::footer"])
> return apache.DECLINED


Is this intended as an alternative to add_stacked_handler or an
additional feature? If it's an alternative solution the I prefer it as
it seems more pythonic.

I don't have alot more to say on these last 2 emails. I think you are on
the right path here.

Jim




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com