On Wed, Aug 11, 2010 at 3:31 PM, francisco treacy <francisco.tre...@gmail.com> wrote: > I have a doubt regarding links and URI-escaping in Riak. …snip… > This shows that in the process of escaping/unescaping there are cases > in which link-walking (and map/reduce for that matter) don't work. > Riak should probably never unescape, and assume all keys are already > escaped.
Hi, Francisco. I've run into this myself in developing a recent application. I've been loathe to change the Riak behavior, for worries of breaking existing client expectations. The original escaping was put in to deal with objects that had been created by the native Erlang client, and therefore might have non-url-safe keys. I'm fairly certain I now agree that Riak should never mess with escaping, though (and that non-url-safe keys should be treated as errors for the HTTP interface). In the meantime, a good workaround is to base64-encode keys used over HTTP. As long as you use alternate characters for + and / (like - and _, called "base64url" on http://en.wikipedia.org/wiki/Base64), you end up with urlencode(base64encode(Key)) == urldecode(base64encode(Key)) == base64encode(Key). -Bryan _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com