Does Eval Module work Now?

Sirsiwal, Umesh usirsiwal at verivue.com
Mon Jan 10 23:31:43 MSK 2011


Thanks agentzh,
I tried rewrite_by_lua with the following simple Lua configuration:

local res = ngx.location.capture("/memc?key=" .. memc_key ) 
print("copass: res " .. res.status .. ' body ' .. res.body)

if res.status == 404 then
        print("copas: capture /memc_set")
        res = ngx.location.capture("/memc_set?key=" .. memc_key)
        print("copss: status " .. res.status);
end



I see that the subrequest was correctly issued to the /memc location. However /memc_set location subrequest was never issued.

The same script works with content_by_lua.

-Umesh


> -----Original Message-----
> From: agentzh [mailto:agentzh at gmail.com]
> Sent: Wednesday, January 05, 2011 11:53 PM
> To: nginx-devel at nginx.org
> Subject: Re: Does Eval Module work Now?
> 
> On Sat, Jan 1, 2011 at 3:12 PM, agentzh <agentzh at gmail.com> wrote:
> > Actually I'm implementing the "rewrite_by_lua" directive for ngx_lua
> > (see its "rewrite" branch on GitHub), which can trivially do all the
> > tasks originally done by ngx_eval :)
> >
> 
> I've merged the "rewrite" branch back to "master". The rewrite_by_lua
> directive should be fully functional now at git HEAD of "master":
> 
>     http://github.com/chaoslawful/lua-nginx-module
> 
> You're very welcome to try it out on your side ;)
> 
> Thanks!
> -agentzh
> 
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://nginx.org/mailman/listinfo/nginx-devel



More information about the nginx-devel mailing list