httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gearls <>
Subject Re: Interpolating %{variables} in all directives
Date Fri, 19 Apr 2013 10:39:21 GMT
Consistency would be a major enhancement. the best solution would be to 
have it enabled without any change to current modules implementation.
Yes, it would be incompatible with the modules that implemented their 
own parsing, but why not establish a new standard for httpd 3?
For 2.x, a trade-off could be found. I am partisan to allow the admin to 
register the modules to exclude from the parsing (like rewrite, etc.)

On 18-04-2013 17:33, Daniel Gruno wrote:
> On 04/18/2013 05:09 PM, Igor Galić wrote:
>> Hey folks o/~
>>  From an IRC conversation in #httpd and #httpd-dev emerged the
>> idea to interpolate %{variables} in all directives.
>> According to sf we have somewhere a ~10 line code fragment
>> which does that without much overhead (not benchmarked) when
>> interpolating and with hardly any (short-circuit) when not.
>> I think it would be a good idea to allow for this to be used
>> in all directives (across all modules) it makes for immensly
>> more readable configurations because:
>> Example:
>>      # default vhost redirecting every HTTP vhost to HTTPS:
>>      <VirtualHost *:80>
>>          Redirect / https://%{HTTP_HOST}/
>>      </VirtualHost>
>> Another example might be something "more advanced" like:
>>      # group specific authorization:
>>      <LocationMatch "^/(?P<group>[^/]+).*">
>>          Require group %{group}
>>      </Location>
> I'm for interpolating in as many places as makes sense, but I'm probably
> not for interpolating eeeeverywhere at once, since that could lead to
> clashes and unwanted results. Interpolation should be enabled in each
> module that wants to use this, and not via a blanket config change (this
> probably isn't viable/possible anyway), but I'm definitely for using it
> in areas such as Redirect*, Location*, Header* and possibly Require
> (although that one might be a tad difficult and would have to be
> implemented locally in each individual auth module I suspect).
> So, +1 to the general idea, but I think it would/should be enabled
> 'manually' in each module, and not some attempt to just make it all
> switch at once. Perhaps we could start with Redirect*?
> With regards,
> Daniel.
> .

View raw message