On Fri, Jan 30, 2004 at 10:46:11AM -0500, Geoffrey Young wrote: > > > Well, thank you both. If there come no objections, I'll commit it these days > > into modules/metadata. > > actually, while I still like the idea, does it make sense to broaden the > scope of the module a bit? I had started a discussion on <IfThreaded>, > which turned into more of an <IfServerIs ...> idea could ping ap_mpm_query > and other things. the main objection, IIRC, was that people weren't too > interested in adding more containers to core. > > so, if mod_version were to be renamed to something like mod_server_attribute > (ok, too long, but I'm bad with names), then perhaps it could (eventually) > be expanded to hold not only <IfVersion> but whatever other <IfFOO> server > attributes people are intersted in. I still think that a container which > could demark a threaded server would be valuable, even if the discussion died :) > > probably not what you had in mind, though - just a thought. if you like the > idea, though, I'd commit it as is, just with a different name - no need to > wait on other things first.
I think someone else previously mentioned something like this: <IfAttr Module ...> (replace <IfModule>) </IfAttr> <IfAttr Defined ...> (replace <IfDefine>) </IfAttr> <IfAttr Version ...> </IfAttr> <IfAttr MPM ...> </IfAttr> And what about having directive namespaces to avoid having to search all modules for a directive? Say an underscore. If the directive contains an underscore, then check for a module that registered that namespace (in a yet-to-be-defined table). If found, search the module for that directive. If not found, fall back to existing behavior. For example, RewriteBase RewriteCond RewriteEngine RewriteLock RewriteLog RewriteLogLevel RewriteMap RewriteOptions RewriteRule would become Rewrite_Base Rewrite_Cond Rewrite_Engine Rewrite_Lock Rewrite_Log Rewrite_LogLevel Rewrite_Map Rewrite_Options Rewrite_Rule Alternatively, build a hash of directives when modules are loaded, which will be a one-time-cost. Cheers, Glenn
