Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 72964 invoked from network); 8 Oct 2009 04:33:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 04:33:55 -0000 Received: (qmail 66059 invoked by uid 500); 8 Oct 2009 04:33:55 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 65973 invoked by uid 500); 8 Oct 2009 04:33:55 -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 65958 invoked by uid 99); 8 Oct 2009 04:33:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 04:33:55 +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; Thu, 08 Oct 2009 04:33:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 46727234C1EC for ; Wed, 7 Oct 2009 21:33:31 -0700 (PDT) Message-ID: <473185159.1254976411274.JavaMail.jira@brutus> Date: Wed, 7 Oct 2009 21:33:31 -0700 (PDT) From: "Ben Hollis (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Created: (COUCHDB-521) negotiate_content_type does not detect application/json in HTTP Accept header if it includes a qvakue 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 negotiate_content_type does not detect application/json in HTTP Accept header if it includes a qvakue ----------------------------------------------------------------------------------------------------- Key: COUCHDB-521 URL: https://issues.apache.org/jira/browse/COUCHDB-521 Project: CouchDB Issue Type: Bug Components: HTTP Interface Reporter: Ben Hollis Priority: Minor If I request a document from CouchDB with an Accept header like this: Accept: application/json Accept: text/html,application/xhtml+xml,application/json,application/xml;q=0.9,*/*;q=0.8 CouchDB will serve back the response with the "application/json" content type. However, if my Accept header looks like: Accept: text/html,application/xhtml+xml,application/json;q=0.9,application/xml;q=0.9,*/*;q=0.8 CouchDB responds with text/plain. This seems to be because in src/couchdb/couch_httpd.erl, in negotiate_content_type, the Accept header is split on "," and then searched for "application/json". It should really discard anything after ";" when searching. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.