Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 98607 invoked from network); 31 Jan 2010 23:28:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Jan 2010 23:28:08 -0000 Received: (qmail 63341 invoked by uid 500); 31 Jan 2010 23:28:07 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 63248 invoked by uid 500); 31 Jan 2010 23:28:07 -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 63238 invoked by uid 99); 31 Jan 2010 23:28:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jan 2010 23:28:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jan 2010 23:27:55 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 923C7234C1E9 for ; Sun, 31 Jan 2010 15:27:34 -0800 (PST) Message-ID: <174211793.161591264980454597.JavaMail.jira@brutus.apache.org> Date: Sun, 31 Jan 2010 23:27:34 +0000 (UTC) From: "Benoit Chesneau (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Closed: (COUCHDB-591) _rewrite handler In-Reply-To: <2072193268.1259947461675.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benoit Chesneau closed COUCHDB-591. ----------------------------------- Resolution: Fixed commited in trunk. Some doc here : http://wiki.apache.org/couchdb/Rewriting_urls also tests. > _rewrite handler > ---------------- > > Key: COUCHDB-591 > URL: https://issues.apache.org/jira/browse/COUCHDB-591 > Project: CouchDB > Issue Type: New Feature > Components: HTTP Interface > Affects Versions: 0.11 > Reporter: Benoit Chesneau > Attachments: couch_httpd_rewriter2.diff, couchdb_rewrite.patch > > > Find attached a patch providing simple url rewritig in CouchDB. You can also find it in my github repo : > http://github.com/benoitc/couchdb/tree/rewrite > 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. All relatives path are relative to design doc. > The _rewriter is available at db or _design level : > /db/_rewrite/designname/path > or > /db/_design/designame/_rewrite/path. > Then _rewrite handler look in design doc if `rewrite` member exists and load the function. A snippet is avalaible here : > http://markmail.org/message/4alwtb2zzgwu7iz7 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.