diff options
author | Alexander Shorin <kxepal@apache.org> | 2015-10-12 18:10:41 +0300 |
---|---|---|
committer | Alexander Shorin <kxepal@apache.org> | 2015-10-12 18:23:43 +0300 |
commit | b9e1f3b5d5a78a706abb358e17130fb7344567d2 (patch) | |
tree | d1511a1c870be5f0cc51a7cebcf04e495775495c | |
parent | 747144ee259b1fe084ee041f783936a7ee1cf2de (diff) | |
download | couchdb-b9e1f3b5d5a78a706abb358e17130fb7344567d2.tar.gz |
Return HTTP 405 for unsupported request method
-rw-r--r-- | src/setup_httpd.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/setup_httpd.erl b/src/setup_httpd.erl index 32c610470..006ed455b 100644 --- a/src/setup_httpd.erl +++ b/src/setup_httpd.erl @@ -39,7 +39,10 @@ handle_setup_req(#httpd{method='GET'}=Req) -> ok -> chttpd:send_json(Req, 200, {[{state, cluster_finished}]}) end - end. + end; +handle_setup_req(#httpd{}=Req) -> + chttpd:send_method_not_allowed(Req, "GET,POST"). + get_options(Options, Setup) -> ExtractValues = fun({Tag, Option}, OptionsAcc) -> |