You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2019/04/12 16:29:29 UTC

[couchdb] branch 2005-get-node-name created (now 2d8366b)

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

wohali pushed a change to branch 2005-get-node-name
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 2d8366b  Expose node name via /_node/_local, closes #2005

This branch includes the following new commits:

     new 2d8366b  Expose node name via /_node/_local, closes #2005

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb] 01/01: Expose node name via /_node/_local, closes #2005

Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 2005-get-node-name
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 2d8366b8d560aa49da3a09b90c007254dba7cb2f
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Fri Apr 12 12:16:10 2019 -0400

    Expose node name via /_node/_local, closes #2005
---
 src/chttpd/src/chttpd_misc.erl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/chttpd/src/chttpd_misc.erl b/src/chttpd/src/chttpd_misc.erl
index efa7ef3..485fb52 100644
--- a/src/chttpd/src/chttpd_misc.erl
+++ b/src/chttpd/src/chttpd_misc.erl
@@ -269,6 +269,8 @@ handle_uuids_req(Req) ->
 
 % Node-specific request handler (_config and _stats)
 % Support _local meaning this node
+handle_node_req(#httpd{path_parts=[_, <<"_local">>]}=Req) ->
+    send_json(Req, 200, node());
 handle_node_req(#httpd{path_parts=[A, <<"_local">>|Rest]}=Req) ->
     handle_node_req(Req#httpd{path_parts=[A, node()] ++ Rest});
 % GET /_node/$node/_config