couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Chesneau (JIRA)" <>
Subject [jira] Updated: (COUCHDB-230) Add Support for Rewritable URL
Date Fri, 20 Aug 2010 08:48:16 GMT


Benoit Chesneau updated COUCHDB-230:

    Attachment: 0001-manage-aliases.patch

Here is a patch that manage rewritting of location. So you could do :

/example = /etape-test-db

or /example/* = /etape-test-db/_design/example/*

Now it doesn't work well when vhosts rewrite url like the last test show:

Vhost rule : = /testdb/_design/somedoc/_rewrite/

alias rule :
/example = /etape-test-db

Vhost first rewrite the path to /testdb/_design/somedoc/_rewrite/example 

This patch doesn't match aliases then it will be ignored. I can inverse the behaviour to match
first aliases then vhosts but it sound weird. What do you think ?

> Add Support for Rewritable URL
> ------------------------------
>                 Key: COUCHDB-230
>                 URL:
>             Project: CouchDB
>          Issue Type: New Feature
>            Reporter: Patrick Aljord
>             Fix For: 1.0.2
>         Attachments: 0001-manage-aliases.patch
> It would be good if couchdb would allow to rewrite urls so that instead of having to
write that:
> I could just write:
> It could be done with the web server but having the rewritten rules in the db would make
it a bit easier for replication so we don't have to write the rules on each web server where
a db gets replicated.
> Here are a few propositions from davisp:
> <davisp> alisdair: how so? rewriting urls should be in _design documents, since
they're in _design docs they should be limited to per db namespaces
> <davisp> bobesponja: I don't know that anyone has looked at it seriously, but my
first guess is that we'd just make a _design/doc "urls" member that's a list of regex's and
targets as is fairly standard practice
> <davisp> bobesponja: or perhaps, regex's -> erlang handler
> <davisp> the second might not be as fun

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message