it cheats and there is a 'REALLY_LAST' and a 'REALLY_FIRST' ;-)

most people just use the pre/post dependancies, and only uses the
first/last thing when it has to do with hacks to do set certain
variables before something is run and some of the hooks are set to run
until someone answers it. (which isn't in django)

there is a draft document here
http://httpd.apache.org/docs/2.2/developer/hooks.html and
http://httpd.apache.org/docs/2.2/developer/hooks.html.

regards
Ian

On 11/15/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On Nov 14, 2005, at 5:05 PM, Ian Holsman wrote:
> > you might want to implement something similar to what apache2 did with
> > their hooks.
> > it sounds pretty complex, but in reality you hardly need to use all
> > the options.
> >
> > 1. define when the middle ware will be run .. FIRST, MIDDLE, or LAST.
> > 2. define which middleware has to run before and which has to run
> > afterwards
> >
> >
> > eg.. this is how I would set up a 'hook' in apache which will run
> > before proxy and after rewrite.
> >
> >     static const char * const aszPreCheck[] = { "mod_rewrite.c",
> > NULL };
> >     static const char * const aszPost[] = { "mod_proxy.c", NULL };
> >
> >     ap_hook_translate_name
> > (check_ontology,aszPreCheck,aszPost,APR_HOOK_FIRST);
>
> Interesting... so (extending thing to Django) each middleware
> component could inform the handler about what order it needs to be
> run in... that sounds like a good start.  How does apache handle two
> different hooks that both claim that they need to be run first (or
> last or whatever)?
>
> Jacob
>


--
[EMAIL PROTECTED] -- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti

Reply via email to