On Thu, Apr 18, 2013 at 4:09 PM, Igor Galić <[email protected]> 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> > > > So long, >
Currently it doesn't matter how long it takes to process a directive, it only happens twice at server startup. If any variable can be interpolated, this would mean re-running any interpolated directive processing at the time of the request. Mostly this would be fine, but it would be very different to everything that went before. Cheers Tom
