couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r814301 - /couchdb/branches/0.10.x/src/couchdb/couch_httpd_misc_handlers.erl
Date Sun, 13 Sep 2009 11:16:05 GMT
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) ->



Mime
View raw message