Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A3FFF8C74 for ; Tue, 16 Aug 2011 12:58:32 +0000 (UTC) Received: (qmail 17846 invoked by uid 500); 16 Aug 2011 12:58:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 17786 invoked by uid 500); 16 Aug 2011 12:58:30 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 17778 invoked by uid 99); 16 Aug 2011 12:58:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 12:58:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of marcello.nuccio@gmail.com designates 209.85.161.180 as permitted sender) Received: from [209.85.161.180] (HELO mail-gx0-f180.google.com) (209.85.161.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 12:58:24 +0000 Received: by gxk10 with SMTP id 10so5529578gxk.11 for ; Tue, 16 Aug 2011 05:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=L2Fq1D0rJq8TiV5nIiuBG2DDr6AfoGXMhT/pUxhKt60=; b=KrgDbarf2gPb3g2h2JYI4GlM6yw/EVD+V2SbT7Nm6k6sXRrNNNJIcATI/Z8fYufHRm bf6I/UXDU+DSiP9/zuhU6NAG67J+LH/RH5iqFtbHCpc+ZMkgZClWRfuqjX+wFc54biu/ WdhLx2WF44vfAj7bX7GlPeZFJwLMLK+ZGpZIA= MIME-Version: 1.0 Received: by 10.42.145.196 with SMTP id g4mr5356220icv.151.1313499482955; Tue, 16 Aug 2011 05:58:02 -0700 (PDT) Received: by 10.42.245.1 with HTTP; Tue, 16 Aug 2011 05:58:02 -0700 (PDT) In-Reply-To: References: <4E371B93.8060303@kearns.net.au> Date: Tue, 16 Aug 2011 14:58:02 +0200 Message-ID: Subject: Re: to CouchApp or not to CouchApp From: Marcello Nuccio To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 2011/8/16 Benoit Chesneau : > On Tue, Aug 16, 2011 at 1:01 PM, Robert Newson 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. > > > 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. This is what I do if the user is authenticated, and I see no reason for not doing it when the response is a 401. Marcello