ngx.lua中遇到的小问题
在使用ngx.redirect 到一个新的地址时,错误日志提示:
lua entry thread aborted: runtime error: attempt to call ngx.redirect after sending out the headers
检查后发现,前面function中已经有ngx.say的过程,所以导致此问题。注释掉rediect前的所有say操作和print操作后即可
在使用ngx.redirect 到一个新的地址时,错误日志提示:
lua entry thread aborted: runtime error: attempt to call ngx.redirect after sending out the headers
检查后发现,前面function中已经有ngx.say的过程,所以导致此问题。注释掉rediect前的所有say操作和print操作后即可