On Sat, Oct 15, 2011 at 4:41 AM, Nginx User <nginx@nginxuser.net> wrote:
> Everything seems to be working fine. However, a small configuration
> error showed a potential problem in that the rewrite_by_lua directive
> does not seem to take account of the rewrite module's "last" flag.
>
I've just fixed this issue in ngx_lua v0.3.1rc13.
Now running "rewrite a b;" and "rewrite a b last;" will cause
rewrite_by_lua and rewrite_by_lua_file (as well as others) to skip
completely.
But please note that, only location rematch (or location re-lookup)
triggered by ngx_rewrite's "rewrite" directive (or anything else) will
skip rewrite phase Lua code. It has nothing to do with rewrite
directive's "last" modifier. So "rewrite a b break" will not skip
rewrite-phase Lua handlers just because no location re-lookup will
follow it.
The location rematch (or re-lookup) behavior of the "rewrite"
directive is kinda like internal redirection, but not the same.
BTW, ngx_openresty 1.0.8.9 devel release already includes this version
of ngx_lua :)
Regards,
-agentzh
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx