summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2008-10-21 19:49:41 +0000
committerJohn Christopher Anderson <jchris@apache.org>2008-10-21 19:49:41 +0000
commit9866203c3c0bff9cd972df09624e5647cfc4e9be (patch)
tree1af5341e1ad678c93893ed385cb7317940b7df31 /src
parentbc8dd6acee3c58474f322821b16892e00d957f83 (diff)
fix for COUCHDB-138 include_docs=true&reduce=false
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@706735 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_httpd_view.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl
index d58dfeee..6f6ff706 100644
--- a/src/couchdb/couch_httpd_view.erl
+++ b/src/couchdb/couch_httpd_view.erl
@@ -308,8 +308,14 @@ parse_view_query(Req, Keys, IsReduce) ->
{"include_docs", Value} ->
case IsReduce of
true ->
- Msg = lists:flatten(io_lib:format("Bad URL query key for reduce operation: ~s", [Key])),
- throw({query_parse_error, Msg});
+ #view_query_args{reduce=OptReduce} = Args,
+ case OptReduce of
+ true ->
+ Msg = lists:flatten(io_lib:format("Bad URL query key for reduce operation: ~s", [Key])),
+ throw({query_parse_error, Msg});
+ _ ->
+ ok
+ end;
_ ->
ok
end,