couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject chttpd commit: updated refs/heads/master to 1e41311
Date Thu, 29 Jan 2015 18:19:52 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master 9a8e65099 -> 1e413118d


Set view type before validating _all_docs parameters.

Matching couch_mrview, set view_type to "map" before validating query
parameters for _all_docs. This fixes a bug whereby validation fails
when specifying _all_docs?conflicts=true.

This closes #20

COUCHDB-2523

Signed-off-by: Alexander Shorin <kxepal@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/1e413118
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/1e413118
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/1e413118

Branch: refs/heads/master
Commit: 1e413118d2bbe3ef97c4bf98a7430e02cde154da
Parents: 9a8e650
Author: Will Holley <willholley@gmail.com>
Authored: Thu Jan 29 17:59:39 2015 +0000
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Thu Jan 29 21:18:38 2015 +0300

----------------------------------------------------------------------
 src/chttpd_db.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/1e413118/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index cdf6038..d40754d 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -534,11 +534,12 @@ db_req(#httpd{path_parts=[_, DocId | FileNameParts]}=Req, Db) ->
 
 all_docs_view(Req, Db, Keys) ->
     Args0 = couch_mrview_http:parse_params(Req, Keys),
-    Args1 = couch_mrview_util:validate_args(Args0),
+    Args1 = Args0#mrargs{view_type=map},
+    Args2 = couch_mrview_util:validate_args(Args1),
     ETagFun = fun(Sig, Acc0) ->
         couch_mrview_http:check_view_etag(Sig, Acc0, Req)
     end,
-    Args = Args1#mrargs{preflight_fun=ETagFun},
+    Args = Args2#mrargs{preflight_fun=ETagFun},
     Options = [{user_ctx, Req#httpd.user_ctx}],
     {ok, Resp} = couch_httpd:etag_maybe(Req, fun() ->
         VAcc0 = #vacc{db=Db, req=Req},


Mime
View raw message