You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2022/09/02 11:30:04 UTC
[couchdb] 01/01: Show supported hash algorithms at node-local _version endpoint
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch add-hashes-to-versions-endpoint
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit e9a2f5e0e8fe987074274c13f2630199ecfa4a4e
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Fri Sep 2 13:28:38 2022 +0200
Show supported hash algorithms at node-local _version endpoint
---
src/chttpd/src/chttpd_node.erl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/chttpd/src/chttpd_node.erl b/src/chttpd/src/chttpd_node.erl
index 6196b5a7d..a63236db7 100644
--- a/src/chttpd/src/chttpd_node.erl
+++ b/src/chttpd/src/chttpd_node.erl
@@ -42,8 +42,12 @@ handle_node_req(#httpd{method = 'GET', path_parts = [_, _Node, <<"_versions">>]}
IcuVer = couch_ejson_compare:get_icu_version(),
UcaVer = couch_ejson_compare:get_uca_version(),
ColVer = couch_ejson_compare:get_collator_version(),
+ Hashes = crypto:supports(hashs),
send_json(Req, 200, #{
- erlang_version => ?l2b(?COUCHDB_ERLANG_VERSION),
+ erlang => #{
+ version => ?l2b(?COUCHDB_ERLANG_VERSION),
+ supported_hashes => Hashes
+ },
collation_driver => #{
name => <<"libicu">>,
library_version => couch_util:version_to_binary(IcuVer),