couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: to CouchApp or not to CouchApp
Date Tue, 16 Aug 2011 13:10:19 GMT
"The only requirement is: if I ask an HTML, give me an HTML, not a JSON."

If only it were that simple. How about, as in the case for IE, both
HTML and JSON are exactly equally acceptable? 1.0.x would send HTML,
1.1.x will send JSON. Both are wrong depending on what you wanted.
Empasse.

B.

On 16 August 2011 14:06, Marcello Nuccio <marcello.nuccio@gmail.com> wrote:
> 2011/8/16 Marcello Nuccio <marcello.nuccio@gmail.com>:
>> 2011/8/16 Benoit Chesneau <bchesneau@gmail.com>:
>>> On Tue, Aug 16, 2011 at 1:01 PM, Robert Newson <rnewson@apache.org> wrote:
>>>
>>>> My revised proposal was to send text/html (and 302's) in all cases
>>>> except for the very specific case where the Accept header is exactly
>>>> one item and that item is 'application/json'. All programmatic calls
>>>> can meet that (libraries incapable of this are de facto poor
>>>> libraries), and the ambiguity is vanquished.
>>>
>>> <myuserdevopinion>
>>> should be application/json imo. We are a document oriented db speaking
>>> in json first. If someone accept text/html where the only thing we
>>> send on resource is json, we should send an error by default (maybe a
>>> setting could override that).
>>
>> This is not what is needed to fix the bug.
>> The only requirement is: if I ask an HTML, give me an HTML, not a JSON.
>
> Sorry, I said it wrong.
> The requirement is: if the resource I am requesting is an HTML, send
> me an HTML, not a JSON.
>
> Marcello
>

Mime
View raw message