Closed mikebeam closed 10 years ago
I just tested on my machine:
1> couchbeam:start().
ok
2> Server = couchbeam:server_connection( "http://localhost:5984", []).
{server,"http://localhost:5984",[]}
3> {ok, DB} = couchbeam:open_or_create_db(Server, "testdb1", []).
{ok,{db,{server,"http://localhost:5984",[]},"testdb1",[]}}
4> {ok, Rows} = couchbeam_view:fetch( DB, {"test", "test"}).
{ok,[]}
5> Rows.
[]
6>
No issue :/ Whcih version of hackney is used? Also which version of couchdb?
ok even if I didn't reproduced it i figured when it happen. This case can happen when the response is closed but we return some data:
https://github.com/benoitc/hackney/blob/master/src/hackney_response.erl#L288
fixed in hackney in : https://github.com/benoitc/hackney/commit/ad4cc47171d4b0ae1da62508b6ea83a3e762e102
I will make a release tomorrow. Need to add another patch first.
Fantastic! Thanks!
On Dec 6, 2013, at 3:11 PM, Benoit Chesneau notifications@github.com wrote:
ok even if I didn't reproduced it i figured when it happen. This case can happen when the response is closed but we return some data:
https://github.com/benoitc/hackney/blob/master/src/hackney_response.erl#L288
fixed in hackney in : benoitc/hackney@ad4cc47
I will make a release tomorrow. Need to add another patch first.
— Reply to this email directly or view it on GitHub.
fixed 2 days ago. thanks for the feedback :)
Hi Benoit,
Using couchbeam 0.9.1, I created a database named "testdb" with the following design document to simulate a view that returns no rows:
Running this code:
Produces this error:
Adding this:
to the first case statement of hackney_stream:stream_loop/4 resolves the issue, but I have no idea if that's an appropriate solution, so I didn't bother with a pull request.
Thanks for all of the work you do.
Best, Mike Beam