httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian V Hughes <bria...@Dartmouth.EDU>
Subject Re: [users@httpd] Question about RequestHeader and Apache's use of Environment Variables
Date Sat, 10 Jul 2004 16:13:19 GMT
On Jul 1, 2004, at 04:21 PM, André Malo wrote:
> * Joshua Slive <jslive@gmail.com> wrote:
>
>> First, the ability to use %e in RequestHeader is a very recent feature
>> addition.  It is not documented in 2.0, and I haven't checked the
>> code, so it may only be available in the dev version (2.1).
>
> It's available in 2.0 as well. Same code, just another header table.
> (note to self: docs update ;-)

Hi, Andre. Thanks for your response on this thread. One question: Are 
you sure that RequestHeader can actually make use of %e to set the 
value of a header? I think Joshua might be right... see below.

>> RewriteCond %{REMOTE_PORT} (.*)
>> RewriteRule .* - [E=R_P:%1]
>>
>> RequestHeader add R-P %{R_P}e
>>
>> But, as I said, I don't think this will work in any 2.0 version.
>
> Fortunately the access to REMOTE_PORT was added to mod_rewrite 
> recently, so
> it should just work that way since 2.0.49.

I'm now running 2.0.50. When I add the Rewrite statements in my 
<VirtualHost> settings, I do see a new environment variable being set 
with the value that I back-referenced from the Cond statement. That 
part works really well.

However, when I try to access that variable's value with the 
RequestHeader statement, using % {}e, all I get is "(null)" for the 
value of the new header. This is exactly what I was getting under 
2.0.48. It's like RequestHeader knows about environment variables, but 
refuses to actually look up their values.

Is there some way to verify whether or not RequestHeader can see and 
use Environment Variables?

-Brian


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message