You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Alexander Shorin (JIRA)" <ji...@apache.org> on 2013/06/28 03:48:20 UTC

[jira] [Updated] (COUCHDB-1005) Rewriting to a URL with 2 replacements fails

     [ https://issues.apache.org/jira/browse/COUCHDB-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shorin updated COUCHDB-1005:
--------------------------------------

    Component/s: HTTP Interface
    
> Rewriting to a URL with 2 replacements fails
> --------------------------------------------
>
>                 Key: COUCHDB-1005
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1005
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira