httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo>
Subject Re: mod_headers -- RequestHeader passing common vars.
Date Sun, 05 Dec 2004 23:35:24 GMT
* Mladen Turk wrote:

> Is there any reason (RFC or security) that prevents using common vars
> within 'RequestHeader XX %{ENV_VAR}e'. Those can now be only set by
> SetEnv, SetEnvIf and PassEnv.
> A simple patch that calls ap_add_common_vars(r) before processing
> the variable from r->subprocess_env will do more then enough.

That's a problem. It's way more than enough. ap_add_common_vars takes time 
at every call of %{...}e. Perhaps one should add a new core option or 
directive instead, which adds those vars only once per request, if needed.

> Second thing is setting the unknown value to string "(null)".

Please separate these two issues. We have an "atomic commit" policy, which 
makes it a lot easier to review and/or revert patches.

> I propose to not set anything if the header value is not present and
> to remove the value from headers_in if present and the required env var
> doesn't exists.

I'd guess, that change would be 2.1 only (backwards compat in 2.0). Here's a 
suggestion, which would be backwards compatible: How about a new format 
%{...}E (and S respectively), which returns NULL if empty? Then the user 
can choose either behaviour.

"Solides und umfangreiches Buch"
                                          -- aus einer Rezension


View raw message