From e6df089ecb2f79d3c3d7b10ebf6351b9a753618a Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Mon, 10 Apr 2017 13:37:50 +0800 Subject: [PATCH] Fix issue #984 - support HEAD method for health check --- src/emqttd_http.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqttd_http.erl b/src/emqttd_http.erl index 692477447..25b7c3d23 100644 --- a/src/emqttd_http.erl +++ b/src/emqttd_http.erl @@ -31,7 +31,7 @@ handle_request(Req) -> handle_request(Req:get(method), Req:get(path), Req). -handle_request('GET', "/status", Req) -> +handle_request(Method, "/status", Req) when Method =:= 'HEAD'; Method =:= 'GET' -> {InternalStatus, _ProvidedStatus} = init:get_status(), AppStatus = case lists:keysearch(emqttd, 1, application:which_applications()) of