REDIS2 Addon, Query LRANGE Support?

Hello,

is it possible to query a LRANGE request with the redis2 addon? I try
this:

 location /redis {
     set_unescape_uri $query $arg_query;
     redis2_raw_query $query;
     redis2_pass 127.0.0.1:6379;
 }

 location /redis-test {
         content_by_lua '
             local parser = require("redis.parser")
             local get = ngx.location.capture("/redis", { args = {

query = “LRANGE mylist 0 2\r\n” } } )
local res, typ = parser.parse_reply(get.body)

             ngx.print(res)
         ';
 }

But i get this error:

[error] 25328#0: *19 Redis server returns invalid response at 18 near
"*3
$4
foo7
$4
foo6
$4
foo5
" while reading response header from upstream

The result in my error log is ok, any chance to get this result into a
lua structure in nginx?

Thanks for any hint.

Alexander

Sorry, my mistake. The current version (updated 4 days ago) works pretty
well.

Thanks so much agentzh for fixing…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs