httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <>
Subject Re: Patch for implementing ap_document_root as a hook
Date Mon, 23 Apr 2007 15:33:00 GMT
Brian J. France wrote:
> On Apr 23, 2007, at 10:32 AM, Jakob Goldbach wrote:
>>> -1 on the face of things.  The map_to_storage hook was added to 
>>> accomplish
>>> what you desire.
>> I thought map_to_storage was made to do per-dir configuration. Not
>> path-translation.
>> The problem is not really doing the translation. I can always provide
>> my own translate handler in my module.
>> But in the current API I cannot to set my env. variables at will. They
>> will be overwritten by ap_add_common_vars which returns
>> carved-in-stone docroot from ap_document_root.
> We need this same functionality (would like to back port to 2.2 if 
> possible).
> We currently hack the doc root in the post read hook in 1.3, would like 
> to be able to do it with out hacking the core and screwing around with 
> internal structs at runtime.

+1, I've been down this road before too.

The problem is that many applications use DOCUMENT_ROOT.  I kinda think 
that they shouldn't, because the entire concept of an document root 
isn't very valid with Alias / Rewrite rules changing the path, but it 
doesn't change that people are using it.

Either we need to change ap_add_common_vars to allow overrides easier 
(and hopefully in a more generic way, for all environment variables), or 
we need to truly make it pluggable, like the path that this patch is 
going down.

I do have issues with how this patch does it, but its general direction 
isn't wrong.


View raw message