set $cookie_abc "$cookie_abc";

Valentin V. Bartenev vbart at nginx.com
Mon Feb 11 18:17:16 UTC 2013


On Monday 11 February 2013 22:07:18 amodpandey wrote:
> The variable $cookie_abc will exist only if the client request cookie has
> "abc". In my case the first request won't have this cookie set and I am
> setting this value for some magic.
> 

It *always* exists. For clients without the cookie it has empty value.

> Lua module is very this on this feature. If we do not have the variable
> defined you should set it before using.
> 
> set $cookie_abc "$cookie_abc"
> 
> If the above works as expected I am good.
> 

Yes. It works as expected.

  wbr, Valentin V. Bartenev

--
http://nginx.com/support.html
http://nginx.org/en/donation.html



More information about the nginx mailing list