February 14, 2011 05:38AM
Hi,

....
On 13/02/2011 06:02, Richard Kearsley wrote:
>
> location /main {
>
> set $myvar '';
>
> set $limit_rate 99;
>
....
>
> set $limit_rate $myvar;
>
As well as the points agentzh made, there is also the case here that
$limit_rate does a check on the values that it is set to, and it must be
a valid size (internally this is done by having a set_handler attached
to the variable - something most variables don't have).

Here, you are trying to set it to '' (i.e. empty), and this is invalid,
and it will :
(a) throw an error in the error log, saying that it's an 'invalid size'
(b) do nothing to the value, therefore leaving it at 99 rather than
setting it to ''

With the config you have, most variables would result in your headers being
....

X-Test: 100

X-Limit:

But you see X-Limit: 99 because of this reason.

Cheers,

Marcus.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

lua possibilities/limitations

Richard Kearsley February 13, 2011 01:16AM

Re: lua possibilities/limitations

agentzh February 13, 2011 11:12PM

Re: lua possibilities/limitations

agentzh February 13, 2011 11:18PM

Re: lua possibilities/limitations

Eugaia February 14, 2011 05:38AM

RE: lua possibilities/limitations

Richard Kearsley February 14, 2011 06:50PM

Re: lua possibilities/limitations

agentzh February 14, 2011 11:32PM

Re: lua possibilities/limitations

Eugaia February 15, 2011 04:02AM

Re: lua possibilities/limitations

agentzh February 15, 2011 05:50AM

Re: lua possibilities/limitations

agentzh July 04, 2011 05:32AM

RE: lua possibilities/limitations

Richard Kearsley July 04, 2011 08:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready