redgeoff / spiegel

Scalable replication and change listening for CouchDB
MIT License
144 stars 19 forks source link

Change-Listener: `listener.db_name` is already URI-Encoded #236

Open HitomiTenshi opened 2 years ago

HitomiTenshi commented 2 years ago

The change-listener process cannot find databases with plus signs in them (probably other special URI-Escaped signs as well). When trying to find the database the slouch dependency will use encodeURIComponent a second time on listener.db_name which will result in the database not being found.

I made a hacky fix here that undoes the first encodeURIComponent so that slouch can find the database:

https://github.com/HitomiTenshi/spiegel/commit/f24f2636d908d259115c8fff02a6981007d348ad

Not sure if this is a good solution, but it does the job for now. If you want me to create a PR from that just say the word.