[
https://issues.apache.org/jira/browse/COUCHDB-576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465662#comment-13465662
]
Robert Newson commented on COUCHDB-576:
---------------------------------------
I had a follow-up thought that I maybe never wrote down. Instead of this silly
idea, add a parameter or header that indicates the type of resource you think
you're talking to. Examples of each;
curl -X DELETE <path to a db>?type=database
or
curl -X DELETE -Hx-couchdb-type:document <path to a document>
If you did this;
curl -X DELETE <path to a db>?type=document
we'd reject the delete.
Client libraries, and careful users, could include the ?type= parameter as a
matter of course.
> Require current update_seq when deleting a database for extra safety.
> ---------------------------------------------------------------------
>
> Key: COUCHDB-576
> URL: https://issues.apache.org/jira/browse/COUCHDB-576
> Project: CouchDB
> Issue Type: Improvement
> Components: Database Core
> Reporter: Robert Newson
> Attachments: delete-db-safety-with-tests.patch
>
>
> Require the current update_seq before deleting a database to prevent
> accidental deletion.
> DELETE /db2?seq=12
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira