You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2015/06/02 21:31:06 UTC
[16/41] chttpd commit: updated refs/heads/2080-port-cors to e2c2bd7
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 <kx...@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/2080-port-cors
Commit: 1e413118d2bbe3ef97c4bf98a7430e02cde154da
Parents: 9a8e650
Author: Will Holley <wi...@gmail.com>
Authored: Thu Jan 29 17:59:39 2015 +0000
Committer: Alexander Shorin <kx...@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},