Skip to content
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

Fixed the path portion of URLs that included a database identifier #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

klpauba
Copy link

@klpauba klpauba commented Nov 12, 2013

According to http://fallabs.com/kyototycoon/spex.html:

The path of the URL in the request line must be encoded by URL encoding. If the path begins with "/", the character is ignored and the trailing string is decoded. Moreover, if the path includes "/" in the middle, the segment before the middle "/" is treated as the database identifier and the next segment is decoded as the key. For example, the record whose key is "I love you" in the database "words.kch" is expressed "/words.kch/I%20love%20you" in the request line.

I have found that, instead, the keys are written to the "default" database and of the form "/words.kch/I%20love%20you" since the path portion of the URL is encoded as "%2Fwords.kch%2FI%20love%20you". In other words, the library does not allow a developer to write key/value pairs to a server that provides access to multiple databases.

The changes provided reformats the path portion of the URL to conform to the specifications described above.

@klpauba
Copy link
Author

klpauba commented Nov 13, 2013

It looks as if I might have duplicated at least some of the effort in pull request #2.

@ghost ghost assigned shamer Nov 21, 2013
@herrbuerger
Copy link

Thanks for providing this fix, I've been banging my head against the wall and wondering what's going on.

It would be great if this could be merged into the master and published so that the working version installs via pip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants