You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2009/09/13 13:16:05 UTC

svn commit: r814301 - /couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl

Author: jan
Date: Sun Sep 13 11:16:04 2009
New Revision: 814301

URL: http://svn.apache.org/viewvc?rev=814301&view=rev
Log:
adhere X-Couch-Persist for DELETEs

Modified:
    couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl

Modified: couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl?rev=814301&r1=814300&r2=814301&view=diff
==============================================================================
--- couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl (original)
+++ couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl Sun Sep 13 11:16:04 2009
@@ -164,11 +164,12 @@
 % 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) ->