lua parser and redis2 questions

gregr401 nginx-forum at nginx.us
Mon Jun 6 02:40:29 MSD 2011


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.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,203154,204202#msg-204202




More information about the nginx mailing list