The current implementation of handlers is a little bizarre, with each
handler both having to register itself and check its own name.
I'm not sure where that comes from, but I can't help thinking the
ap_provider API might be a more rational way to declare handlers.

We have one frequently-requested feature that IMO we should support:
cascaded/fallback handlers.  The request for this typically says "if a
document isn't there, then use my handler as backup".  ErrorDocument
offers a limited workaround, but
  (a) This shouldn't have to be an error path
  (b) This should be able to cascade

So, how about AddHandler & friends taking a *list* of handlers as argument
(let's call the new version AddHandlerByExt)?  Then we can run each handler
in turn until one returns a value other than DECLINED.   That would be coupled 
with the default handler being assigned a name and being configurable to 
appear anywhere in the list, so "fall back to my CGI if there's no file of 
that name" becomes "AddHandlerByExt .html default cgi-script".
ErrorDocuments are invoked when we fall off the end of the list.

For a slightly bigger change, we can use ap_provider on top of that to
declare and reference handlers.

-- 
Nick Kew

Reply via email to