Hello!
2015-01-30 18:42 GMT-08:00 Xiaohui Sun:
> ngx.location.capture
> syntax: res = ngx.location.capture(uri, options?)
>
> 官方wiki上也没有说明有第三个参数
> 但是当我使用的时候
>
> bad argument #3 to 'ngx_location_capture' (string expected, got nil)
>
是的,这个错误信息比较迷惑人。其原因很可能是因为你的第一个 URI 参数为 nil. 比如下面这个例子可以复现你看到的错误:
ngx.location.capture(nil, {})
如果是这个问题,请提供一个最小化的代码示例,以便我可以浮现你看到的问题。
Regards,
-agentzh