httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: cvs commit: httpd-2.0/server/mpm/winnt mpm_winnt.c
Date Tue, 09 Jan 2001 22:07:43 GMT wrote:
> > I was mulling the same issue over yesterday. It seems to me that we
> > _should_ be giving any specific match first shot. One way to do
> > this is to specify AP_HOOK_LAST for any handlers that have wildcards.
> > Question though, do we need to ensure foo/* get its shot before */* ?
> A)  Specifying AP_HOOK_LAST won't work unless we separate the checks into
> two functions, so that we have something like:
> ap_hook_1(...)
> {
>     if(!strcmp(SPECIFIC, r->handler)
>         real_handler
> }
> ap_hook_2(...)
> {
>     if (!strcmp_match(GENERAL, r->handler)
>         real_handler
> }
> real_handler(...)
> {
>     ...
> }
> ap_hook_handler(ap_hook_1, NULL, NULL, AP_HOOK_MIDDLE)
> ap_hook_handler(ap_hook_2, NULL, NULL, AP_HOOK_LAST)

Although this is nominally correct, I have found _no instances_ where it
actually happens. The only one I can find is the default handler, which
handles "default-handler" or "*/*" and that clearly can come last. Hmm.
Actually I suppose you might want to force the "real" default handler
before some other default handler, but that really is stretching a

> While this will work, it is really bad, and I seriously dislike it, a lot.

Why is it bad? At least it is clear (as well as rare).

> b)  We never used to distinguish between foo/* and */* when ordering our
> matches before, so we don't need to do it now.

Seems to me that was a bug, and a good argument for explicit ordering.




"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