-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Parsed reply bodies from zrange with "withscore" option do not have any delimiter between the member and score, thus making the reply almost impossible to interpret.
Some test code below. The /redis location is a raw_response redis interpretor that is used in many of your examples. The output is 1 999888, which is confusing.
local parser = require "redis.parser"
local req = parser.build_query( { "zadd", "test", 888, 999 } )
req = req .. parser.build_query( { "zrange", "test", 0, -1, "withscores" })
local res = ngx.location.capture("/redis?2",
{ body = req })
local replies = parser.parse_replies(res.body, 2)
-- formatted reply
for i, reply in ipairs(replies) do
local res, typ = reply[1], reply[2]
ngx.say(res)
end
(Awesome work on open_resty btw!)
Metadata
Metadata
Assignees
Labels
No labels