From dev-return-5754-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Wed Aug 12 11:38:31 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 23201 invoked from network); 12 Aug 2009 11:38:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Aug 2009 11:38:31 -0000 Received: (qmail 74921 invoked by uid 500); 12 Aug 2009 11:38:38 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 74849 invoked by uid 500); 12 Aug 2009 11:38:37 -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 74839 invoked by uid 99); 12 Aug 2009 11:38:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 11:38:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 11:38:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 16DFA234C004 for ; Wed, 12 Aug 2009 04:38:15 -0700 (PDT) Message-ID: <1657387911.1250077095081.JavaMail.jira@brutus> Date: Wed, 12 Aug 2009 04:38:15 -0700 (PDT) From: "Robert Newson (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Created: (COUCHDB-463) Allow client to insist on Content-Type: application/json in all responses MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Allow client to insist on Content-Type: application/json in all responses ------------------------------------------------------------------------- Key: COUCHDB-463 URL: https://issues.apache.org/jira/browse/COUCHDB-463 Project: CouchDB Issue Type: Improvement Reporter: Robert Newson The Content-Type of responses is negotiated via Accept (application/json if acceptable, text/plain if not). When the client is the browser, this often fails as the Accept line usually does not include application/json. Consider a query parameter to force application/json responses even without the Accept header. Couchdb-lucene does this today (it didn't do it yesterday), described as; "force_json Usually couchdb-lucene determines the Content-Type of its response based on the presence of the Accept header. If Accept contains "application/json", you get "application/json" in the response, otherwise you get "text/plain;charset=utf8". Some tools, like JSONView for FireFox, do not send the Accept header but do render "application/json" responses if received. Setting force_json=true forces all response to "application/json" regardless of the Accept header." I recognize it duplicates the HTTP content negotiation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.