-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keys with spaces #10
Comments
"this is a key" shouldn't be accessible via the http interface because it doesn't translate to a valid URI. Unfortunately viewing keys that aren't accessible via the http interface is not something that can be worked around (as far as I know). I did discover interesting behavior in the Javascript client when encoding a space with a "+" or "%20" the JS client always uses %20 even though you can have different values at "test+key" and "test%20key" since riak does not decode the url. I'll be working on fixing this behavior with + vs %20. |
Hmm, do you know if there's any good reason in Riak that I shouldn't use keys with spaces at all or is this just a problem with HTTP interface? I mean I'm using RiakJS and PHP Riak Client at the moment and I don't know if either one uses HTTP interface. However, Rekon is something that at least for me finally pushes Riak over Mongo & Couch in development efficiency so awesome job :) |
I think both of those are using the HTTP interface. The Riak PHP Client may be using protobuffs, but I don't think so. Using the http interface, your key must be part of a valid URI, which means the spaces must be encoded using + or %20. |
I also ran into this issue, and for me, the primary concern was related to using sessions from the connect middleware in express. A workaround that I applied was this. In the connect source code, modify the file at .../connect/lib/middleware/session.js to update the store hash function, and remove any instance of the '+' symbol by modifying the replace applied in the function. This update makes the sessions viewable with the rekon interface. Might save you some time. e.g. ~ @ line 221 |
Actually, I had tested this and it seemed to work, but I need to look further. There is something that I have missed, which needs further evaluation. In any case, try to eliminate spaces in your keys, and that should provide a workaround for now, if you can achieve it. |
This version has been tested further and seems to resolve the issue for sessions. The code below replaces those symbols with riak legal ones. @ ~ line 221
}; |
One final note, I am using express, and it is providing its own copy of the connect node_module. |
Keys with spaces aren't showing correctly i.e. "this is a key" doesn't show. You can access it via direct Riak link of course but Rekon UI doesn't work.
The text was updated successfully, but these errors were encountered: