Welcome! Log In Create A New Profile

Advanced

Re: lua parser and redis2 questions

June 05, 2011 06:40PM
Thanks, logar. I mimicked your test config and the below is the result:


location /testluaparser {
content_by_lua '
local replies = ngx.location.capture("/redis2")
local parser = require("redis.parser")
ngx.say("reply status is:",replies.status)
ngx.say("reply body is:",replies.body)
ngx.say("end of showresults")
local res,typ = parser.parse_reply(replies.body)
ngx.say("type=", typ)
ngx.say("res=", res)
';
}

reply status is:200
reply body is:$11
auth is off
$3
bar

end of showresults
type=4
res=auth is off


I'm still stuck with properly parsing pipelined requests as I'm attempting to perform an AUTH check in conjunction with a few gets.
Subject Author Posted

lua parser and redis2 questions

gregr401 June 01, 2011 07:27PM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 08:49AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:12AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:16AM

Re: lua parser and redis2 questions

agentzh June 04, 2011 11:22AM

Re: lua parser and redis2 questions

gregr401 June 04, 2011 02:15PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:06AM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 04:26PM

Re: lua parser and redis2 questions

gregr401 June 05, 2011 06:40PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:12AM

Re: lua parser and redis2 questions

logar.damir June 06, 2011 07:16AM

Re: lua parser and redis2 questions

agentzh June 06, 2011 10:56AM

Re: lua parser and redis2 questions

gregr401 June 06, 2011 12:50PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 09:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready