couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject mem3 commit: updated refs/heads/master to 80fd81b
Date Mon, 12 Oct 2015 22:39:57 GMT
Repository: couchdb-mem3
Updated Branches:
  refs/heads/master de5f32815 -> 80fd81b33


Return HTTP 405 for unsupported request method


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/80fd81b3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/80fd81b3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/80fd81b3

Branch: refs/heads/master
Commit: 80fd81b3350dc96918b460b3bfb646fddade80f2
Parents: de5f328
Author: Alexander Shorin <kxepal@apache.org>
Authored: Mon Oct 12 20:31:00 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Tue Oct 13 01:38:08 2015 +0300

----------------------------------------------------------------------
 src/mem3_httpd.erl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/80fd81b3/src/mem3_httpd.erl
----------------------------------------------------------------------
diff --git a/src/mem3_httpd.erl b/src/mem3_httpd.erl
index 2331e95..5358158 100644
--- a/src/mem3_httpd.erl
+++ b/src/mem3_httpd.erl
@@ -26,7 +26,9 @@ handle_membership_req(#httpd{method='GET',
     couch_httpd:send_json(Req, {[
         {all_nodes, lists:sort([node()|nodes()])},
         {cluster_nodes, lists:sort(ClusterNodes)}
-    ]}).
+    ]});
+handle_membership_req(#httpd{path_parts=[<<"_membership">>]}=Req) ->
+    chttpd:send_method_not_allowed(Req, "GET").
 
 handle_shards_req(#httpd{method='GET',
         path_parts=[_DbName, <<"_shards">>]} = Req, Db) ->
@@ -44,7 +46,12 @@ handle_shards_req(#httpd{method='GET',
     couch_httpd:send_json(Req, {[
         {range, Shard},
         {nodes, Dbs}
-    ]}).
+    ]});
+handle_shards_req(#httpd{path_parts=[_DbName, <<"_shards">>]}=Req, _Db) ->
+    chttpd:send_method_not_allowed(Req, "GET");
+handle_shards_req(#httpd{path_parts=[_DbName, <<"_shards">>, _DocId]}=Req, _Db)
->
+    chttpd:send_method_not_allowed(Req, "GET").
+
 %%
 %% internal
 %%


Mime
View raw message