This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch partition-review-fixes
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 28c3b12ba5410ea69f2c77ace911270c334d4d6f
Author: Garren Smith <garren.sm...@gmail.com>
AuthorDate: Tue Oct 16 12:23:46 2018 +0200

    improvements to http layer for partitions
---
 src/chttpd/src/chttpd_httpd_handlers.erl | 4 +++-
 src/chttpd/src/chttpd_view.erl           | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/chttpd/src/chttpd_httpd_handlers.erl 
b/src/chttpd/src/chttpd_httpd_handlers.erl
index 2659d39..e4cab7c 100644
--- a/src/chttpd/src/chttpd_httpd_handlers.erl
+++ b/src/chttpd/src/chttpd_httpd_handlers.erl
@@ -12,7 +12,7 @@
 
 -module(chttpd_httpd_handlers).
 
--export([url_handler/1, db_handler/1, design_handler/1, 
partition_design_handler/1]).
+-export([url_handler/1, db_handler/1, design_handler/1, 
partition_design_handler/1, partition_handler/1]).
 
 url_handler(<<>>)                  -> fun chttpd_misc:handle_welcome_req/1;
 url_handler(<<"favicon.ico">>)     -> fun chttpd_misc:handle_favicon_req/1;
@@ -47,3 +47,5 @@ design_handler(_) -> no_match.
 
 partition_design_handler(<<"_view">>) -> fun 
chttpd_view:handle_partition_view_req/4;
 partition_design_handler(_) -> no_match.
+
+partition_handler(_) -> no_match.
diff --git a/src/chttpd/src/chttpd_view.erl b/src/chttpd/src/chttpd_view.erl
index 7c1dc81..c1dc186 100644
--- a/src/chttpd/src/chttpd_view.erl
+++ b/src/chttpd/src/chttpd_view.erl
@@ -151,8 +151,8 @@ check_partition_restrictions(#mrargs{} = Args) ->
         {<<"stable">>, Args#mrargs.stable, true},
         {<<"conflicts">>, Args#mrargs.conflicts, true}
     ],
-    lists:foreach(fun ({Param, Field, Value}) ->
-        case Field =:= Value of
+    lists:foreach(fun ({Param, ArgValue, RestrictedValue}) ->
+        case ArgValue =:= RestrictedValue of
             true ->
                 Msg = [<<"`">>, Param, <<"=true` is not supported in this 
view.">>],
                 throw({bad_request, ?l2b(Msg)});

Reply via email to