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

Reply via email to