[
https://issues.apache.org/jira/browse/COUCHDB-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214089#comment-14214089
]
ASF GitHub Bot commented on COUCHDB-1175:
-----------------------------------------
GitHub user olafura opened a pull request:
https://github.com/apache/couchdb/pull/284
Backport Accept check from chttpd
Backport "Accept check" from chttpd to correctly handle when browser
try to access a database when they aren't logged in or need to change their
login
This fixes so many bugs that have been littering the bug system for years.
The problem was that browsers over promise and we were using that to check
if it was json or html. I have another patch that is only 4 lines added and
two
changed but since it was changed in chttpd I thought merging that was the
best
thing.
Also if this patch doesn't get accepted I have an other solution in a form
of allowing
rewrite to change headers.
This closes #283
COUCHDB-1175
COUCHDB-2435
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/olafura/couchdb 1.x.x
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb/pull/284.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #284
----
commit cedb1c3f31c79b99819aa4f9376f4ebd3b8bc4d5
Author: Olafur Arason <[email protected]>
Date: 2014-11-16T20:03:20Z
Backport Accept check from chttpd to correctly handle when browser
try to access a database when they aren't logged in or need to change
their login
----
> 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
> Priority: Blocker
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)