Welcome! Log In Create A New Profile

Advanced

REDIS2 Addon, Query LRANGE Support?

Alexander Kunz
February 16, 2011 01:18PM
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






_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

URL encoding issue

Harish Sundararaj April 15, 2010 06:46AM

Re: URL encoding issue

Maxim Dounin April 15, 2010 08:50PM

Re: URL encoding issue

acaron February 16, 2011 08:41AM

Re: URL encoding issue

Igor Sysoev February 16, 2011 09:02AM

Re: URL encoding issue

Maxim Dounin February 16, 2011 09:22AM

REDIS2 Addon, Query LRANGE Support?

Alexander Kunz February 16, 2011 01:18PM

Re: REDIS2 Addon, Query LRANGE Support?

Alexander Kunz February 16, 2011 02:44PM

Re: URL encoding issue

acaron February 20, 2011 12:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready