Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 44560 invoked from network); 5 Dec 2009 08:48:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Dec 2009 08:48:36 -0000 Received: (qmail 78653 invoked by uid 500); 5 Dec 2009 08:48:35 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 78560 invoked by uid 500); 5 Dec 2009 08:48:34 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 78550 invoked by uid 99); 5 Dec 2009 08:48:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Dec 2009 08:48:34 +0000 X-ASF-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.216.202 as permitted sender) Received: from [209.85.216.202] (HELO mail-px0-f202.google.com) (209.85.216.202) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Dec 2009 08:48:32 +0000 Received: by pxi40 with SMTP id 40so950309pxi.13 for ; Sat, 05 Dec 2009 00:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YmkVUtO6ySyasOT5HAf9lpa4E1j/zt4HfLCuu8RjrDQ=; b=lACX88VfS57vTQgYGoGBGI2hhNmz7p/FaxHcYwv7uOKEYrnMJkSsBFRzUNkmJz4c2L hP+MQnl66ywNiGbA8W7PG6mjp35NsbdMnoR8zgyPlcwwzz/mNWUbZrE5n18VL3rTmB1A HdYoZ6AV+X6B6Z/KDXxWvIVtPPGRaghLuCdQw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=sGrokqWImOiokgwS7+WEPEmCpqGA4mtK0I54bzqK8rSBqMy3MviXN2YRod6MugWn5f MJ4b9PRsR9kNTUGNX/DRI7zCdXB7f9XKkYibEjQrjB4IU+YTe66ay9L7ek+vNOfkFnUc bxqXbPJbf3HZs6RcflKJq7bpeL35dHIgoasOg= MIME-Version: 1.0 Received: by 10.140.135.11 with SMTP id i11mr271320rvd.102.1260002892055; Sat, 05 Dec 2009 00:48:12 -0800 (PST) In-Reply-To: References: Date: Sat, 5 Dec 2009 09:48:12 +0100 Message-ID: Subject: Re: _rewrite handler From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Saturday, December 5, 2009, Roger Binns wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Benoit Chesneau wrote: >> The design is very simple. Everything is managed via a simple >> javascript function that return a path or throw 'forbidden', >> 'unauthorized' and "not found" errors. The request object is passed to >> the function and then depending on the path, verb or userCtx you could >> decide how to rewrite the path. > > Is there any chance it could a document too? =A0For example it would be r= eally > nice if there was a document with an _id of "_rewrite_config" (or somethi= ng > similar) that was also passed to the function. =A0That document can then = help > parameterize what the rewriter does. > > Roger what would do this doc?