rnewson commented on code in PR #5317:
URL: https://github.com/apache/couchdb/pull/5317#discussion_r1809608483
##########
src/chttpd/src/chttpd_misc.erl:
##########
@@ -68,15 +68,10 @@ handle_welcome_req(Req, _) ->
send_method_not_allowed(Req, "GET,HEAD").
get_features() ->
- case dreyfus:available() of
- true -> [search];
- false -> []
- end ++
- case nouveau:enabled() of
- true -> [nouveau];
- false -> []
- end ++
- config:features().
+ HasSearch = [search || dreyfus:available()],
+ HasNouveau = [nouveau || nouveau:enabled()],
+ HasQuickJS = [quickjs || couch_server:get_js_engine() == <<"quickjs">>],
Review Comment:
a small preference for `/= <<"spidermonkey">>` since that's the one I think
you are striving not to add (otherwise we'd just add the result of
get_js_engine() in all cases, which arguably is more helpful anyway)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]