You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Paul Joseph Davis (JIRA)" <ji...@apache.org> on 2010/10/09 21:46:11 UTC

[jira] Updated: (COUCHDB-521) negotiate_content_type does not detect application/json in HTTP Accept header if it includes a qvakue

     [ https://issues.apache.org/jira/browse/COUCHDB-521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-521:
--------------------------------------

    Skill Level: Regular Contributors Level (Easy to Medium)

> 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.