couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Giarlo (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-463) Allow client to insist on Content-Type: application/json in all responses
Date Mon, 31 Aug 2009 01:41:32 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749352#action_12749352
] 

Michael J. Giarlo commented on COUCHDB-463:
-------------------------------------------

FYI, the JSONovich add-on for Firefox explicitly sends the application/json type in the Accept
header as of version 1.1, so it operates as expected with CouchDB.

JSONovich: https://addons.mozilla.org/en-US/firefox/10122

Version 1.1 is in the sandbox, so it's not yet up on mozilla.org, but it's available via http://lackoftalent.org/michael/blog/json-in-firefox/


> Allow client to insist on Content-Type: application/json in all responses
> -------------------------------------------------------------------------
>
>                 Key: COUCHDB-463
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-463
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>
> The Content-Type of responses is negotiated via Accept (application/json if acceptable,
text/plain if not). When the client is the browser, this often fails as the Accept line usually
does not include application/json.
> Consider a query parameter to force application/json responses even without the Accept
header. Couchdb-lucene does this today (it didn't do it yesterday), described as;
> "force_json
>     Usually couchdb-lucene determines the Content-Type of its response based on the presence
of the Accept header. If Accept contains "application/json", you get "application/json" in
the response, otherwise you get "text/plain;charset=utf8". Some tools, like JSONView for FireFox,
do not send the Accept header but do render "application/json" responses if received. Setting
force_json=true forces all response to "application/json" regardless of the Accept header."
> I recognize it duplicates the HTTP content negotiation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message