diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-03-21 14:18:46 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-03-21 14:18:46 +0000 |
commit | 17266b0581a214315ebf8ce7454ef9f73fc2a02a (patch) | |
tree | 15885e7e0b82637d3d8737428be7c52c44fcfeeb /src/couchdb | |
parent | cc3cd646a64e2cd6e4c318532ba469b152defb41 (diff) |
provide a 404 response on deletion of non-existant docs
closes COUCHDB-297
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@756948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 03fbb001..2bfc2940 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -423,6 +423,8 @@ all_docs_view(Req, Db, Keys) -> db_doc_req(#httpd{method='DELETE'}=Req, Db, DocId) -> + % check for the existence of the doc to handle the 404 case. + couch_doc_open(Db, DocId, nil, []), case couch_httpd:qs_value(Req, "rev") of undefined -> update_doc(Req, Db, DocId, {[{<<"_deleted">>,true}]}); |