couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [1/2] couchdb-setup git commit: Return HTTP 405 for unsupported request method
Date Mon, 12 Oct 2015 22:42:04 GMT
Repository: couchdb-setup
Updated Branches:
  refs/heads/master d0a9b7224 -> b9e1f3b5d


Return HTTP 405 for unsupported request method


Project: http://git-wip-us.apache.org/repos/asf/couchdb-setup/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-setup/commit/b9e1f3b5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-setup/tree/b9e1f3b5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-setup/diff/b9e1f3b5

Branch: refs/heads/master
Commit: b9e1f3b5d5a78a706abb358e17130fb7344567d2
Parents: 747144e
Author: Alexander Shorin <kxepal@apache.org>
Authored: Mon Oct 12 18:10:41 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Mon Oct 12 18:23:43 2015 +0300

----------------------------------------------------------------------
 src/setup_httpd.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-setup/blob/b9e1f3b5/src/setup_httpd.erl
----------------------------------------------------------------------
diff --git a/src/setup_httpd.erl b/src/setup_httpd.erl
index 32c6104..006ed45 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) ->


Mime
View raw message