[ https://issues.apache.org/jira/browse/COUCHDB-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052349#comment-13052349 ]
Jason Smith commented on COUCHDB-1175: -------------------------------------- Great discussion. I also hope this fix goes into 1.2. Marcello, don't give up! You are speaking truth to power! Benoit, I agree the best thing is to identify the correct response to the variety of queries. If you see me on IRC, I volunteer to help you build the list. I suspect that once we clearly define the requirements, lo and behold, the solution will be to follow the standard. Filipe, your pull request will help, but it is slightly incorrect? The primary sort is the 'q' value but the secondary sort is the more specific type. foo/bar > foo/* > */* For CouchDB, I would not think that will cause a bug because the only mistake it could make is for "Accept: */*, text/html" which seems like a rare header value in the wild. OTOH, if IE8 really sends "bull/shit, more/shit, */*" then CouchDB should probably treat that as text/html. (AJAX tools like jQuery modify the header, so Couch is pretty sure this is a direct query for a resource intended to be displayed.) > Improve content type negotiation for couchdb JSON responses > ----------------------------------------------------------- > > Key: COUCHDB-1175 > URL: https://issues.apache.org/jira/browse/COUCHDB-1175 > 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 for. > We should follow the standard. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira