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.