GitHub user TomaszKasowicz opened an issue:
https://github.com/apache/couchdb/issues/452
DELETE /db/doc/attachment returns 200 OK for non existing attachments
Hi
While playing with doc attachments I found out that CouchDB returns 200 OK
and updates document rev when user tries to delete non-existing attachment
Here's an example output
'''
root@5d984b5559b3:/# curl -X PUT 'http://127.0.0.1:5984/testdb'
{"ok":true}
root@5d984b5559b3:/# curl -X PUT 'http://127.0.0.1:5984/testdb/doc' -d '{}'
{"ok":true,"id":"doc","rev":"1-967a00dff5e02add41819138abb3284d"}
root@5d984b5559b3:/#
root@5d984b5559b3:/# curl -X DELETE
'http://127.0.0.1:5984/testdb/doc/attachment?rev=1-967a00dff5e02add41819138abb3284d'
{"ok":true,"id":"doc","rev":"2-7051cbe5c8faecd085a3fa619e6e6337"}
'''
Is this OK? I'm confused because CouchDB API documentation states that I
should receive 404
Thank You
Tomasz
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---