httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: How to Handle Handlers and Order Hooks (and Other Matters)
Date Mon, 01 Jan 2001 13:45:53 GMT wrote:
> I wanted the day to think about this.  :-)
> I almost like it.  My only concern, is the matching.  If I understand what
> you are saying, each handler would register a function, without specifying
> the char *, then the core would call every handler, and pass them the
> (Handler, Mime-Type, etc).  The handler would then either return quickly
> with a DECLINED, or it would try to process the request.  Is that correct?


> I dislike calling every handler, even if we could tell before-hand that we
> aren't going to use it.
> Could the handlers register a hook with the following call:
> ap_register_handler(char *handler, func *handler_func, pred, succ, order);
> The core could then keep track of everything internally.  Allowing us to
> use a simple table to determine which Handler should be called, but making
> things look like hooks to Apache.

I agree, but I believe that the ability for the core to prefilter hook
functions is something that can be done for other hooks, too. So, if we
are going to have this ability, we should have it across the board,
rather than special-casing this particular one. Once you agree that,
then you should agree that an acceptable interim solution is to _not_
prefilter for now, but note that we should. Its an optimisation.

However, I'm now halfway through type-safe generic hooks (i.e. ones that
modules can export but don't screw up if the module isn't there). I
think I have a rather elegant solution to this, so I'm going to stick
with it for now. I'll present it later today, I hope.




"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

View raw message