summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2008-06-23 21:32:58 +0000
committerChristopher Lenz <cmlenz@apache.org>2008-06-23 21:32:58 +0000
commitd054aef0e2419db31d8277a051b54abdf6ee1d34 (patch)
tree0df7dde90ff318e351531a5732e577a5cb451b3e /src
parent438c9cf20e28662d0f2c6a9b9228a98f886c59a8 (diff)
Apply patch by Chris Anderson that fixes an edge case in the HTTP view interface resulting in an invalid JSON response body. Closes COUCHDB-84.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@670774 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_httpd.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index da3d7555..72e87b02 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -463,7 +463,7 @@ output_reduce_view(Req, View) ->
fun(_Key, _Red, {AccSeparator,AccSkip,AccCount}) when AccSkip > 0 ->
{ok, {AccSeparator,AccSkip-1,AccCount}};
(_Key, _Red, {AccSeparator,0,AccCount}) when AccCount == 0 ->
- {stop,{AccSeparator,0,AccCount}};
+ {ok, {AccSeparator,0,AccCount}};
(_Key, Red, {AccSeparator,0,AccCount}) when GroupLevel == 0 ->
Json = lists:flatten(cjson:encode({obj, [{key, null}, {value, Red}]})),
Resp:write_chunk(AccSeparator ++ Json),