benoitc / couchbeam

Apache CouchDB client in Erlang
Other
242 stars 114 forks source link

Changes feed only returns {error,function_clause} [PATCH] #29

Closed jhs closed 14 years ago

jhs commented 14 years ago

Using the examples/changes.ebin code, I only receive {error,function_clause} messages instead of {change,Change}, etc. The reason is because couchbeam_db:send_changes/3 tries to run string:tokens/2 on a binary instead of a string (list).

My master branch has a fix (jhs/couchbeam@c0220238ac925d97937e50bb37a0c1100fb38ea5). I am not sure if maybe old lhttpc or old Erlang returned a list so I allowed for that possibility, but convert if it is a binary. It works for me.

I cherry-picked the patch and applied to 0.4.2 in jhs/couchbeam@0ba4b6c4dd1d9b50c03a0422e04bbaee75782edb.

benoitc commented 14 years ago

fixed in last head. Thanks for the patch :)