diff options
author | Jan Lehnardt <jan@apache.org> | 2009-09-13 11:14:41 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-09-13 11:14:41 +0000 |
commit | 8a05205d2c2256b58335d70a5700ff2590481e31 (patch) | |
tree | 1e9e3ed8a7b594a87dba1ed2a6ba197af15ca864 /src/couchdb/couch_httpd_misc_handlers.erl | |
parent | 88cebc6db367f0619eefac55c01d4ca532278a54 (diff) |
adhere X-Couch-Persist for DELETEs
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814299 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_misc_handlers.erl')
-rw-r--r-- | src/couchdb/couch_httpd_misc_handlers.erl | 3 |
1 files changed, 2 insertions, 1 deletions
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) -> |