couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Chesneau (JIRA)" <>
Subject [jira] Commented: (COUCHDB-1005) Rewriting to a URL with 2 replacements fails
Date Mon, 03 Jan 2011 00:55:45 GMT


Benoit Chesneau commented on COUCHDB-1005:

The internal url use query parameter to skip a step to remove them rom parameters it doesn't

About the possibility to use ":var1:var2" it was discussed already on irc and on the ml. It
would imply to use another kind of rewriting based on regexp or such. There is a consensus
around on not using regexp in the rewriter.

What is the real usage of this rewriting ? Why not calling directly the docid ? ie:

from : "/:id",

where id = user%2Fplugin ?

> Rewriting to a URL with 2 replacements fails
> --------------------------------------------
>                 Key: COUCHDB-1005
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>            Reporter: Sam Bisbee
> When I pull two variables out of a URL and drop them into the target, the target URL
breaks. However, it appears that the variables are being captured appropriately.
> This couch was built from source on Ubuntu 10.04 and is running a default config.
> Unexpected Results
> ----------------------------
> Assuming that we're querying the _rewrite handler with /foo/bar
> { "from": "/:user/:plugin", "to": "../../:user-:plugin"} will result in /db/undefined?user=foo&plugin=bar
> { "from": "/:user/:plugin", "to": "../../:user :plugin"} will result in /db/undefined?user=foo&plugin=bar
> { "from": "/:user/:plugin", "to": "../../:user"} will CORRECTLY result in /db/foo?user=foo&plugin=bar
> Expected Results
> ------------------------
> { "from": "/:user/:plugin", "to": "../../:user-:plugin"} should result in /db/foo-bar?user=foo&plugin=bar
> { "from": "/:user/:plugin", "to": "../../:user :plugin"} will result in /db/foo bar?user=foo&plugin=bar

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

View raw message