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 7BBFF17782 for ; Mon, 27 Apr 2015 15:58:39 +0000 (UTC) Received: (qmail 58226 invoked by uid 500); 27 Apr 2015 15:58:39 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 58112 invoked by uid 500); 27 Apr 2015 15:58:39 -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 58065 invoked by uid 99); 27 Apr 2015 15:58:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 15:58:39 +0000 Date: Mon, 27 Apr 2015 15:58:39 +0000 (UTC) From: "Alexander Shorin (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (COUCHDB-2676) DELETE of a database returns JSON answer with type text/plain MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Shorin closed COUCHDB-2676. ------------------------------------- Resolution: Not A Problem It's a content type negotiation where for {{Accept: */*}} text/plain is preferred in the way to make API be friendly for the browsers. {code} http delete http://localhost:5984/test 'Accept:application/json' HTTP/1.1 200 OK Cache-Control: must-revalidate Content-Length: 12 Content-Type: application/json Date: Mon, 27 Apr 2015 15:56:00 GMT Server: CouchDB/1.6.1 (Erlang OTP/17) { "ok": true } {code} If you explicitly ask for application/json response - you'll get it. Same is true for the most of other endpoints. Search for "content negotiation" on JIRA for more info about that behaviour. > DELETE of a database returns JSON answer with type text/plain > ------------------------------------------------------------- > > Key: COUCHDB-2676 > URL: https://issues.apache.org/jira/browse/COUCHDB-2676 > Project: CouchDB > Issue Type: Bug > Security Level: public(Regular issues) > Components: HTTP Interface > Affects Versions: 1.6.1 > Reporter: Samuel Tardieu > > DELETE should return its response with a "application/json" MIME type. > {code} > % curl -v -X DELETE http://localhost:5984/test > * Trying ::1... > * Connected to localhost (::1) port 5984 (#0) > > DELETE /test HTTP/1.1 > > Host: localhost:5984 > > User-Agent: curl/7.42.0 > > Accept: */* > > > < HTTP/1.1 200 OK > < Server: CouchDB/1.6.1 (Erlang OTP/17) > < Date: Mon, 27 Apr 2015 15:30:14 GMT > < Content-Type: text/plain; charset=utf-8 > < Content-Length: 12 > < Cache-Control: must-revalidate > < > {"ok":true} > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)