incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Hendricks <mich...@ndrix.org>
Subject deleting a deleted document
Date Thu, 10 Jul 2008 03:34:53 GMT
When using the bulk delete feature, I expected that deleting a document
which has already been deleted would respond with a 404 code.  However,
it responds with a 201 indicating that there is no problem.  Is this
expected behavior?  Here are the relevant HTTP requests and responses.
I'm running the current trunk version of CouchDB.


Delete a newly created document:

---- Request ----
POST http://127.0.0.1:5984/net-couchdb-4854-21551/_bulk_docs
Accept: application/json

{"docs":[{"_deleted":true,"_id":"1fffb1e8a4e3d9e69e14f6e83b408ef4","_rev":"1180153770"}]}

---- Response ----
HTTP/1.1 201 Created
Cache-Control: must-revalidate
Date: Thu, 10 Jul 2008 03:23:49 GMT
Server: CouchDB/0.9.0a-incubating (Erlang OTP/R12B)
Content-Length: 84
Content-Type: application/json
Client-Date: Thu, 10 Jul 2008 03:23:49 GMT
Client-Peer: 127.0.0.1:5984
Client-Response-Num: 1

{"ok":true,"new_revs":[{"id":"1fffb1e8a4e3d9e69e14f6e83b408ef4","rev":"161286410"}]}




Trying to delete the same document a second time:

---- Request ----
POST http://127.0.0.1:5984/net-couchdb-4854-21551/_bulk_docs
Accept: application/json

{"docs":[{"_deleted":true,"_id":"1fffb1e8a4e3d9e69e14f6e83b408ef4","_rev":"161286410"}]}

---- Response ----
HTTP/1.1 201 Created
Cache-Control: must-revalidate
Date: Thu, 10 Jul 2008 03:23:49 GMT
Server: CouchDB/0.9.0a-incubating (Erlang OTP/R12B)
Content-Length: 84
Content-Type: application/json
Client-Date: Thu, 10 Jul 2008 03:23:49 GMT
Client-Peer: 127.0.0.1:5984
Client-Response-Num: 1

{"ok":true,"new_revs":[{"id":"1fffb1e8a4e3d9e69e14f6e83b408ef4","rev":"890346482"}]}

-- 
Michael

Mime
View raw message