httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenter Knauf <fua...@apache.org>
Subject Re: svn commit: r1466669 - /httpd/httpd/branches/2.4.x/STATUS
Date Thu, 11 Apr 2013 10:29:40 GMT
On 11.04.2013 12:10, Daniel Gruno wrote:
> On 04/10/2013 11:21 PM, Guenter Knauf wrote:
>
>>
>> - r:expr(string) sample uses %{HTTP_HOST}, but that doesnt work for me
>
> This function does work perfectly, on Linux/FreeBSD at least ;)
> it uses ap_expr, so whatever that function supports, this should as
> well. What I tried on www.humbedooh.com was:
>
>      local match = r:expr("%{HTTP_HOST} =~ /^www/")
>      if match then
>          r:puts("expr matches")
>      else
>          r:puts("expr doesn't match")
>      end
>
> and I got "expr matches" :)
ok, I admit that I didnt test exactly this sample; but the usage of 
%{HTTP_HOST} there made me think that it will always be expanded, f.e. like:
r:puts("HTTP_HOST=%{HTTP_HOST}\n")
and this didnt work ...

Gün.




Mime
View raw message