couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-230) Add Support for Rewritable URL
Date Fri, 30 Jan 2009 20:10:59 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669005#action_12669005
] 

Paul Joseph Davis commented on COUCHDB-230:
-------------------------------------------

There's been idle discussion about such a system on IRC and I figured that it seems like enough
people are starting to have to deal with it that we should probably get some discussion going.

The general outline that I'd suggest would be to have the (one of many) standard methods using
regex's to do transparent redirects (ie, the redirect is inside CouchDB not via response code).

Couple thoughts:
1. All redirects should be limited to the scope of a single database.
2. Redirects should be specified in _design documents.
3. Profit

The one specific argument against a URL rewrite mechanism I remember was from Chris on how
this could cause major havoc for client libraries. I'd contend that the same could be said
of all the path specifications in the config files. We're giving users a tool they can use,
but they only have themselves to blame if they get into a pile of hurt.


> Add Support for Rewritable URL
> ------------------------------
>
>                 Key: COUCHDB-230
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-230
>             Project: CouchDB
>          Issue Type: New Feature
>            Reporter: Patrick Aljord
>             Fix For: 1.0
>
>
> It would be good if couchdb would allow to rewrite urls so that instead of having to
write that:
> http://127.0.0.1:5984/blogdb/_design/sofa/account.html
> I could just write:
> http://127.0.0.1:5984/blogdb/account
> 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.


Mime
View raw message