[ https://issues.apache.org/jira/browse/COUCHDB-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051822#comment-13051822 ]
Marcello Nuccio commented on COUCHDB-1175: ------------------------------------------ I think I have found a solution which can make everyone happy. If we do support "q" parameters in Accept headers, we can remove "authentication_redirect" option. Any browser I know of uses it properly, and gives to "text/html" higher preference. We only need to send the login html page as response to unauthorized clients if they give higher preference to "text/html". We do not need to redirect them to another page. "authentication_redirect" can become "authentication_page" to keep the possibility to change it. But that is all. As I have said, there is no ambiguity in "Accept: text/html, */*", because the standard says clearly how to deal with it. What do you think? > 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