Hello !
I use openresty 1.2.6 with luajit and test a simple example:
location /test1 {
content_by_lua '
local res = ngx.location.capture("/test2/auth", {args = ngx.var.args})
ngx.say(res.body)
';
}
location /test2 {
content_by_lua '
ngx.say(ngx.var.args)
';
}
I request a url like "http://127.0.0.1:80/test1?parent=29&name=2013031816214284300707&footprint=dsfasfwefklds"
Surprise, the args return "parent=29&name=2013031816214284300707&footprint=dsfasfweX", the footprint arg was changed somewhere.
I think maybe some memory corruption occur. I dive into the ngx_lua source and find that there is no luaL_checkstack, so I think maybe stack overflow when lua call c function.
Now I change LUA_MINSTACK to 50 and all is OK.
Is it need to add luaL_checkstack to control stack overflow when lua call c function?