You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ni...@swisscom.com on 2004/07/28 16:41:43 UTC

[users@httpd] Set RequestHeader based on existence of environment variable

Hi

I am trying to set a request header based on the existence of a
particular environment variable. Basically the request header should
only be set if a particular cookie does not exist. So far I've done the
following

SetEnvIf Cookie .*TestCookie.* HAS_COOKIE

and now I want to do something like

RequestHeader add MyHeader "No cookie set yet" env=!HAS_COOKIE

However RequestHeader won't accept the env value on the end. I know this
will work for response headers by using

Header add MyHeader "No cookie set yet" env=!HAS_COOKIE

but is there any way to do the same thing for request headers?

Thanks a lot for any help.

Niamh




Re: [users@httpd] Set RequestHeader based on existence of environment variable

Posted by André Malo <nd...@perlig.de>.
* <Ni...@swisscom.com> wrote:

> Header add MyHeader "No cookie set yet" env=!HAS_COOKIE
> 
> but is there any way to do the same thing for request headers?

Just update to 2.0.50.

nd
-- 
"Umfassendes Werk (auch fuer Umsteiger vom Apache 1.3)"
                                          -- aus einer Rezension

<http://pub.perlig.de/books.html#apache2>

---------------------------------------------------------------------
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