You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/04/24 16:48:04 UTC

[jira] [Commented] (COUCHDB-3362) DELETE attachment on non-existing document creates the document, rather than returning 404

    [ https://issues.apache.org/jira/browse/COUCHDB-3362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981485#comment-15981485 ] 

ASF subversion and git services commented on COUCHDB-3362:
----------------------------------------------------------

Commit 5713b30e0e1e3d86cd41a3adbcf878b7ed214873 in couchdb's branch refs/heads/master from [~jiangph]
[ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=5713b30 ]

Avoid creation of document if deleting attachment on non-existent doc
  - Check existence of document before deleting its attachment
  - if document doesn’t exist, return 404 instead of creating new
    document

Fixes COUCHDB-3362/FB 85549


> DELETE attachment on non-existing document creates the document, rather than returning 404
> ------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-3362
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3362
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 1.6.1
>            Reporter: Jonathan Hall
>
> To reproduce:
> Create an emtpy database:
> curl -v -X PUT http://admin:abc123@localhost:6001/new
> Then try to delete an attachment from a (non-existant) document:
> curl -v -X DELETE http://admin:abc123@localhost:6001/new/foo/foo.txt
> The result is that the document "foo" is created:
> {"ok":true,"id":"foo","rev":"1-967a00dff5e02add41819138abb3284d"}
> Expected:
> 404 error, as per the docs: http://docs.couchdb.org/en/2.0.0/api/document/attachments.html#delete--db-docid-attname
> Observed in both CouchDB 1.6.1 and 2.0.0



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)