replicate-couchdb-cluster
replicate-couchdb-cluster copied to clipboard
Unable to handle Databases with a slash in the name
Nice library by the way, works very well from what I have seen so far.
We have recently encountered a problem though in an environment where the database names exist with a '/', and the names aren't being escaped.
For example, db name = 'abc/001/123/333', to enable couchdb to handle the slashes need to be turned into '%2F' such as 'abc%2F001%2F123%2F333'.
Cheers, look forward to hearing from you.
Hey @jeremysgitty! I haven't confirmed that this is an issue, but if what you say is correct then I think the proper solution is to modify slouch so that calls involving the DB correctly encode the DB name. At a minimum, this would be all the slouch calls in https://github.com/redgeoff/replicate-couchdb-cluster/blob/master/scripts/cluster.js.
If you need help creating a PR for slouch then please let me know.
I confirm this is a problem. Added issue in slouch https://github.com/redgeoff/slouch/issues/134
I confirm that the fix proposed in https://github.com/redgeoff/replicate-couchdb-cluster/pull/48 fixes this issue.