You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benoit Chesneau (JIRA)" <ji...@apache.org> on 2010/02/01 00:27:34 UTC

[jira] Closed: (COUCHDB-591) _rewrite handler

     [ 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.