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 GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/18 08:05:41 UTC

[jira] [Commented] (COUCHDB-1594) Incoherent behavior when delete attachments

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

ASF GitHub Bot commented on COUCHDB-1594:
-----------------------------------------

Github user wohali commented on the issue:

    https://github.com/apache/couchdb/issues/452
  
    This is a duplicate of https://issues.apache.org/jira/browse/COUCHDB-1594 which shows that this issue has been around since ~CouchDB 1.2. We should fix it, but this is at least not a regression.
    
    @rnewson you might be amused by this one. 👀 


> Incoherent behavior when delete attachments
> -------------------------------------------
>
>                 Key: COUCHDB-1594
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1594
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 1.2
>         Environment: Mac OS X Lion 10.7.5
>            Reporter: Filippo Fadda
>            Priority: Minor
>
> There is an incoherent behavior when a client asks CouchDB to delete a resource. In fact, when you try to delete a Database or a Document and they don't exist, you get a 404 error. Instead, in case you delete an Attachment that doesn't exist, you'll get a 200 status code.
> Here the three cases:
> ==============================================================================
> Database deletion
> ==============================================================================
> DELETE /adajhdgas HTTP/1.1
> Accept: application/json
> User-Agent: ElephantOnCouch 0.1
> Connection: close
> Host: 127.0.0.1:5984
> Authorization: Basic cGlwcG86Y2FsaXBwbw==
> HTTP/1.1 404 Object Not Found
> Server: CouchDB/1.2.0 (Erlang OTP/R15B02)
> Date: Thu, 08 Nov 2012 16:58:07 GMT
> Content-Type: application/json
> Content-Length: 41
> Cache-Control: must-revalidate
> {"error":"not_found","reason":"missing"}
> ==============================================================================
> ==============================================================================
> Document deletion
> ==============================================================================
> DELETE /programmazione/000569be-ecd9-446f-f681-74224e3dfc8b?rev=hhgg HTTP/1.1
> Accept: application/json
> User-Agent: ElephantOnCouch 0.1
> Connection: close
> Host: 127.0.0.1:5984
> Authorization: Basic cGlwcG86Y2FsaXBwbw==
> HTTP/1.1 404 Object Not Found
> Server: CouchDB/1.2.0 (Erlang OTP/R15B02)
> Date: Thu, 08 Nov 2012 16:55:26 GMT
> Content-Type: application/json
> Content-Length: 41
> Cache-Control: must-revalidate
> {"error":"not_found","reason":"deleted"}
> ==============================================================================
> ==============================================================================
> Attachment deletion
> ==============================================================================
> DELETE /programmazione/0003ef13-f2dd-4ccd-cbcb-dec902e7bca7/pippo%3F.txt?rev=3-54bb13543ca770a223611a1307e45dc9 HTTP/1.1
> Accept: application/json
> User-Agent: ElephantOnCouch 0.1
> Connection: close
> Host: 127.0.0.1:5984
> Authorization: Basic cGlwcG86Y2FsaXBwbw==
> HTTP/1.1 200 OK
> Server: CouchDB/1.2.0 (Erlang OTP/R15B02)
> Date: Thu, 08 Nov 2012 16:59:49 GMT
> Content-Type: application/json
> Content-Length: 99
> Cache-Control: must-revalidate
> {"ok":true,"id":"0003ef13-f2dd-4ccd-cbcb-dec902e7bca7","rev":"4-e8973f12e1ad7190d8a6b737b97b7073"}
> ==============================================================================



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