You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2012/06/07 14:32:23 UTC

git commit: Send a 202 response for _restart

Updated Branches:
  refs/heads/master 72ea7e382 -> b213e16ff


Send a 202 response for _restart

COUCHDB-1492


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

Branch: refs/heads/master
Commit: b213e16ff8974386d279f6d8aaf844655960fd76
Parents: 72ea7e3
Author: Robert Newson <rn...@apache.org>
Authored: Thu Jun 7 13:31:50 2012 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jun 7 13:31:50 2012 +0100

----------------------------------------------------------------------
 src/couchdb/couch_httpd_misc_handlers.erl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b213e16f/src/couchdb/couch_httpd_misc_handlers.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl
index 6ee49e0..4025448 100644
--- a/src/couchdb/couch_httpd_misc_handlers.erl
+++ b/src/couchdb/couch_httpd_misc_handlers.erl
@@ -90,8 +90,9 @@ handle_task_status_req(Req) ->
 handle_restart_req(#httpd{method='POST'}=Req) ->
     couch_httpd:validate_ctype(Req, "application/json"),
     ok = couch_httpd:verify_is_server_admin(Req),
+    Result = send_json(Req, 202, {[{ok, true}]}),
     couch_server_sup:restart_core_server(),
-    send_json(Req, 200, {[{ok, true}]});
+    Result;
 handle_restart_req(Req) ->
     send_method_not_allowed(Req, "POST").