koron / nvgd

Filterable (grep, head and tail) HTTP file server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis protocol doesn't support URL encode in path elements

koron opened this issue · comments

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

replace / by %252f (URL encoded twice) in next release.

$ curl http://127.0.0.1:3000/redis://local/get/foo%252fbar
ABC

v1.7.1 fix this.

use %252f instead of /