Hello! On Sun, Jan 6, 2013 at 8:23 PM, Aaron Lewis <the.war...@gmail.com> wrote: > 当执行 ngx.redirect 之后,还需要 ngx.exit (ngx.OK) 吗? > ngx.redirect() 调用从不会返回,所以写在后面像 ngx.exit() 这样的代码根本不会被执行。更多细节请参见官方文档: http://wiki.nginx.org/HttpLuaModule#ngx.redirect Best regards, -agentzh
Hello!On Sun, Jan 6, 2013 at 8:23 PM, Aaron Lewis <the.warl...@gmail.com> wrote:> 当执行 ngx.redirect 之后,还需要 ngx.exit (ngx.OK) 吗?>ngx.redirect() 调用从不会返回,所以写在后面像 ngx.exit() 这样的代码根本不会被执行。更多细节请参见官方文档: http://wiki.nginx.org/HttpLuaModule#ngx.redirectBest regards,-agentzh
On Sun, Jan 6, 2013 at 8:23 PM, Aaron Lewis <the.warl...@gmail.com> wrote:> 当执行 ngx.redirect 之后,还需要 ngx.exit (ngx.OK) 吗?>
ngx.redirect() 调用从不会返回,所以写在后面像 ngx.exit() 这样的代码根本不会被执行。更多细节请参见官方文档:
http://wiki.nginx.org/HttpLuaModule#ngx.redirect
Best regards,-agentzh
好的,非常感谢!return ngx.redirect ()On Tuesday, January 8, 2013 3:11:51 AM UTC+8, agentzh wrote: Hello!On Sun, Jan 6, 2013 at 8:23 PM, Aaron Lewis <the.warl...@gmail.com> wrote:> 当执行 ngx.redirect 之后,还需要 ngx.exit (ngx.OK) 吗?>ngx.redirect() 调用从不会返回,所以写在后面像 ngx.exit() 这样的代码根本不会被执行。更多细节请参见官方文档: http://wiki.nginx.org/HttpLuaModule#ngx.redirectBest regards,-agentzh
这地方也不需要 return 关键字--smallfish http://chenxiaoyu.org 2013/1/8 Aaron Lewis <the.warl...@gmail.com> 好的,非常感谢!return ngx.redirect ()On Tuesday, January 8, 2013 3:11:51 AM UTC+8, agentzh wrote: Hello!On Sun, Jan 6, 2013 at 8:23 PM, Aaron Lewis <the.warl...@gmail.com> wrote:> 当执行 ngx.redirect 之后,还需要 ngx.exit (ngx.OK) 吗?>ngx.redirect() 调用从不会返回,所以写在后面像 ngx.exit() 这样的代码根本不会被执行。更多细节请参见官方文档: http://wiki.nginx.org/HttpLuaModule#ngx.redirectBest regards,-agentzh