riak-ripple / ripple

A rich Ruby modeling layer for Riak, Basho's distributed database
Other
619 stars 152 forks source link

MapReduce URI-escapes buckets/keys #235

Closed outoftime closed 12 years ago

outoftime commented 12 years ago

I noticed that the MapReduce class calls escape all over the place when constructing itself, which is implemented as CGI#escape. However, the MapReduce phase executes by POSTing a JSON document to Riak, so I don't think it makes sense to URI-escape the values. After noticing this as a problem when constructing my own map/reduce with keys that contain URI-unsafe characters, I got it working easily enough by overriding MapReduce#escape to just return the value untouched.

I'm happy to submit a patch for this; just wanted to confirm that my instincts are correct first. Thanks!

seancribbs commented 12 years ago

If you are using Riak 1.0 do Riak.url_escaping = true and this will not occur.

seancribbs commented 12 years ago

Moved to https://github.com/basho/riak-ruby-client/issues/6