[PATCH] Make $proxy_host and $proxy_port accessible in dynamic languages

Maxim Dounin mdounin at mdounin.ru
Mon Oct 28 20:41:08 UTC 2013


Hello!

On Sun, Oct 27, 2013 at 03:46:05PM -0700, Yichun Zhang (agentzh) wrote:

> Hello!
> 
> Recently a user of our ngx_lua module reported that he could not
> access $proxy_host and $proxy_port in Lua because these two variables
> set the flag NGX_HTTP_VAR_NOHASH:
> 
>     https://github.com/chaoslawful/lua-nginx-module/issues/301
> 
> The patch below removes this flag from these two variables to make
> them accessible in dynamic languages like Perl and Lua. Comments
> welcome!

What's the intended use?  Note that variables are marked as NOHASH 
if they are not expected to be usable in dynamic cases like 
embedded perl/ssi.  This allows to reduce variables hash size and 
to speed up things.  Just removing the flag without real need 
looks silly.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx-devel mailing list