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 024748066 for ; Tue, 16 Aug 2011 16:28:06 +0000 (UTC) Received: (qmail 27098 invoked by uid 500); 16 Aug 2011 16:28:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27054 invoked by uid 500); 16 Aug 2011 16:28:04 -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 27043 invoked by uid 99); 16 Aug 2011 16:28:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 16:28:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 206.225.164.31 as permitted sender) Received: from [206.225.164.31] (HELO EXHUB020-4.exch020.serverdata.net) (206.225.164.31) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 16:27:56 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.169]) by EXHUB020-4.exch020.serverdata.net ([206.225.164.31]) with mapi; Tue, 16 Aug 2011 09:27:36 -0700 From: Jens Alfke To: "user@couchdb.apache.org" Date: Tue, 16 Aug 2011 09:27:35 -0700 Subject: Re: to CouchApp or not to CouchApp Thread-Topic: to CouchApp or not to CouchApp Thread-Index: AcxcMWfca/9uq8T5Ry6aK3Ph90F3sg== Message-ID: References: <4E371B93.8060303@kearns.net.au> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org On Aug 16, 2011, at 9:16 AM, Marcello Nuccio wrote: > Ignoring for an instant that this is hard to implement, as Jason says. > What is the problem if I send an HTML response, if the requested > resource is HTML? Because if the client requesting the HTML is not a user-facing web browser,= the 302 is the wrong response, because the client won=92t know what to do = with the resulting login form (unless it does screen-scraping.) I=92ve alre= ady run into this in implementing my CouchCocoa framework. It is IMHO naive to assume that a browser only wants HTML and a non-browser= REST client (like a native app) only wants JSON. That=92s not always true = and it=92s not the right way to tell the two apart. =97Jens=