httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gruno <rum...@cord.dk>
Subject Re: [users@httpd] <If> test against env variable previously defined by SetEnvIf
Date Tue, 10 Apr 2012 15:49:59 GMT
On 10-04-2012 17:36, Pierre-Rudolf Gerlach wrote:
>
> My bad for the missing quote, I changed the values in the exemple
> without re-testing it, sorry.
>
> You example works for a deny. However, if I slightly modify it,
> replacing "Require all denied" by a variable setting, like this
>
> SetEnvIf dummy .* myvar=value
> <If "env('myvar') == 'value'">
>  SetEnvIf dummy .* myothervar=othervalue
> </If>
> Header set myvar %{myvar}e
> Header set myothervar %{myothervar}e
>
> I get the problem : "myothervar" is not set. (null in the response
> headers). I don't really get what difference it would make ?
>
> Thanks, regards
>
I have tried inputting exactly what you wrote into my configuration, and
the output I got was:

  HTTP/1.1 200 OK
  ...
  myvar: value
  myothervar: othervalue
  Content-Type: text/html

So it _should_ work, unless you have some other directives interfering
with it.
The only other explanation I can think of is that I'm using 2.4.2-dev
instead of 2.4.1, perhaps something changed since 2.4.1?

With regards,
Daniel.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message