Redis protocol doesn't support URL encode in path elements
koron opened this issue · comments
MURAOKA Taro commented
https://github.com/koron/nvgd/blob/master/doc/protocol-redis.md
$ redis-cli
redis 127.0.0.1:6379> keys *
1) "foo/bar"
2) "foo"
$ curl http://127.0.0.1:3000/redis://local/get/foo%2fbar
failed to open redis://local/get/foo%2fbar; strconv.ParseInt: parsing "bar": invalid syntax
$ curl http://127.0.0.1:3000/redis://local/get/foo
123
MURAOKA Taro commented
replace /
by %252f
(URL encoded twice) in next release.
$ curl http://127.0.0.1:3000/redis://local/get/foo%252fbar
ABC
MURAOKA Taro commented
v1.7.1 fix this.
use %252f
instead of /