From dev-return-24013-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Nov 8 17:22:18 2012 Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CC62D2D5 for ; Thu, 8 Nov 2012 17:22:18 +0000 (UTC) Received: (qmail 24635 invoked by uid 500); 8 Nov 2012 17:22:14 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 24349 invoked by uid 500); 8 Nov 2012 17:22:13 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 23972 invoked by uid 99); 8 Nov 2012 17:22:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 17:22:12 +0000 Date: Thu, 8 Nov 2012 17:22:12 +0000 (UTC) From: "Filippo Fadda (JIRA)" To: dev@couchdb.apache.org Message-ID: <1194382847.87410.1352395332365.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (COUCHDB-1594) Incoherent behavior when delete attachments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Filippo Fadda created COUCHDB-1594: -------------------------------------- Summary: 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira