Glenn Strauss wrote: [...]
I think this is something that Apache 2.1/2 should address. Having server-wide config localized for requests. it'll benefit things like mod_userdir, us and many other modules which may have the need to modify server-wide values for the duration of the request.
Agreed.
(Straying a bit off-topic here)
How would you approach that? Always deep-copying the entire server_rec and conn_rec for each request seems to me to be very expensive, and would either require too much internal knowledge of each module's config, or would require that all modules be rewritten to provide a hook for localizing their private configs. Neither seems likely to happen.
Besides, that sounds like the solution to the wrong problem. There should be a better way to get information like document_root or userdir information without reaching into private module configs.
If we're talking "filesystem mappings" then there ought to be a way for all modules that deal with "filesystem mapping" to share and exchange information _and_ make sure that all other "filesystem mapping" modules have access to and _use_ these changes.
The same goes for user lookups. There should be never be a time that multiple modules during the _same_ request should have to make multiple getpwnam() or LDAP or other lookups on the same userid. They should be able to share that information.
If you have any suggestions how to do this under the hood in Apache, I'll make an attempt to code it.
I think those structures should live in request_rec and be initialized at request_rec init time. That way there is no issues with threads and all modules can benefit from that. In the modperl world that will translate to:
$s->document_root (give me the global docroot) $r->document_root (give me the docroot of this request)
but blowing up the size of request_rec is not the best idea, so may be there should be some optional appendix hanging off request_rec which can be populated on demand. so for example if anybody tries to set the document_root during request time, that appendix will get initialized from the server global data and, and for the duration of this request all accessors will use that appendix.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html