-
Notifications
You must be signed in to change notification settings - Fork 71
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
db.streamChanges() seems broke #5
Comments
After a small amount of digging, I noticed that this wasn't working because streamChanges() sends its options through the toQuery() function, which JSON encodes the feed param. Given that AFAIK the only JSON-valued parameters in CouchDB's API are key, startkey and endkey, I think you should instead whitelist the params to be JSON encoded: function(query) { I think this should cover your bases: |
Did this actually cause you any issues? I ask because one of the couchdb guys told me all query values should be JSON quoted other than "stale=ok". |
This definitely wasn't working for me. Any value of feed besides continuous (w/o quotes) closes the HTTP connection immediately. I've been writing code against my own branch just fine, with the parameter encoding patch described above. You should have a pull request waiting from me... (^_^) |
Thanks! Applied in d43a67a |
Calling db.streamChanges() generates a URL including this:
/_changes?feed=%22continuous%22
When it should be this:
/_changes?feed=continuous
The text was updated successfully, but these errors were encountered: