From 8a05205d2c2256b58335d70a5700ff2590481e31 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sun, 13 Sep 2009 11:14:41 +0000 Subject: adhere X-Couch-Persist for DELETEs git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814299 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_misc_handlers.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '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 7f5573ff..37ed709f 100644 --- a/src/couchdb/couch_httpd_misc_handlers.erl +++ b/src/couchdb/couch_httpd_misc_handlers.erl @@ -163,11 +163,12 @@ handle_config_req(#httpd{method='GET', path_parts=[_, Section, Key]}=Req) -> % DELETE /_config/Section/Key handle_config_req(#httpd{method='DELETE',path_parts=[_,Section,Key]}=Req) -> ok = couch_httpd:verify_is_server_admin(Req), + Persist = couch_httpd:header_value(Req, "X-Couch-Persist") /= "false", case couch_config:get(Section, Key, null) of null -> throw({not_found, unknown_config_value}); OldValue -> - couch_config:delete(Section, Key), + couch_config:delete(Section, Key, Persist), send_json(Req, 200, list_to_binary(OldValue)) end; handle_config_req(Req) -> -- cgit v1.2.3