Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 5064 invoked from network); 30 Nov 2010 06:59:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Nov 2010 06:59:24 -0000 Received: (qmail 73484 invoked by uid 500); 30 Nov 2010 06:59:22 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 73238 invoked by uid 500); 30 Nov 2010 06:59:22 -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 73230 invoked by uid 99); 30 Nov 2010 06:59:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 06:59:22 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.214.180 as permitted sender) Received: from [209.85.214.180] (HELO mail-iw0-f180.google.com) (209.85.214.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 06:59:16 +0000 Received: by iwn37 with SMTP id 37so6717781iwn.11 for ; Mon, 29 Nov 2010 22:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=4uyLAA4bOfKAZKhNLQODBFIZP4XX7HiuLewlCuDsTu0=; b=xwCkwg+lgyWq+f3Mcy7fN/knS9qvXpSoxB6oNhFTs9OxMH5sIYiDyMX5wynYJJOmZk AztY02e+7b7j3E/WYPG2eY3UeEEsYB4VjqTuA+UCsRrPa61h1+1BUq2rZUm90dpyquZQ RBDi7s9zlOnaCO0NBEuC9sVkVxSZExoFHOChI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=qRAARlYHA4PBinWHSOGzxiLWscPN93bjniM2MogDXLRYSOYFba1YCEVnAjAfnPCD8I 8JBJYKfIFzGvkwu7shWBP/xkFx1Xof3twHvzFjsxvPucHCgm5zMn9/ZhKVMJV4yXInIp curE8WCmBJuwal5/bRZXnfzxkLsuSia7EfMzs= Received: by 10.231.39.137 with SMTP id g9mr6788445ibe.101.1291100335610; Mon, 29 Nov 2010 22:58:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.14.197 with HTTP; Mon, 29 Nov 2010 22:58:15 -0800 (PST) In-Reply-To: References: <04EBAD2D-B44B-46E2-BC31-3E89CA738684@utt.fr> From: Paul Davis Date: Tue, 30 Nov 2010 01:58:15 -0500 Message-ID: Subject: Re: Sending a redirect from a list To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Nov 30, 2010 at 1:51 AM, Aur=E9lien B=E9nel = wrote: > Thanks for your answer, Paul. > >> Unfortunately, the current list behaviour doesn't allow you to modify re= sponse headers after calling getRow(). > > > Oh, too bad... > Is there a plan to change this behaviour? > There have been suggestions to changing that API. I would currently rate the timescale for such a change on the order of months to a year. Definitely no discussions have suggested anything in the next couple releases. Although, an interested developer that provided patches might be able to seriously contract that timeline ;) HTH, Paul Davis > > Aur=E9lien > > >>> I'm trying to send a redirect from a list with the following code: >>> >>> function (head, req) { >>> =A0var row =3D getRow(); >>> =A0if (row) { >>> =A0 var url =3D "/"; =A0 // Will be computed from row >>> =A0 return {"code": 302, "headers":{ "Location": url}}; >>> =A0} else { >>> =A0 return({"code": 404, "body": "Not here"}); >>> =A0} >>> } >