couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noah Slater (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1175) Improve content type negotiation for couchdb JSON responses
Date Fri, 08 Jul 2011 10:21:16 GMT


Noah Slater commented on COUCHDB-1175:

"Both text/html and application/json have the same preference value (1.0). Whichever way we
jump, something goes wrong."

I disagree. If the q value is the same, we get to pick which one we want to serve up. In this
instance, we assume it is a browser request, so we serve up HTML. What is the problem in only
serving up JSON if application/json or application/* has a higher q value than the text/html
or text/* media types? Is there a use case this does not work for?

Also, Jason... 7 coolpoints for you, sir.

> Improve content type negotiation for couchdb JSON responses
> -----------------------------------------------------------
>                 Key: COUCHDB-1175
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>    Affects Versions: 1.0.2
>            Reporter: Robert Newson
>            Assignee: Robert Newson
>            Priority: Blocker
>             Fix For: 1.1.1, 1.2
> Currently we ignore qvalues when negotiation between 'application/json' and 'text/plain'
when returning JSON responses.
> Specifically, we test directly for 'application/json' or 'text/plain' in the Accept header.
Different branches have different bugs, though. Trunk returns 'application/json' if 'application/json'
is present at all, even if it's less preferred than 'text/plain' when qvalues are accounted
> We should follow the standard.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message