[
https://issues.apache.org/jira/browse/COUCHDB-2031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13875806#comment-13875806
]
Adam Kocoloski commented on COUCHDB-2031:
-----------------------------------------
So I added a basic test, but interestingly enough it fails when the DB name
contains an encoded "/" (the rewriter is unable to bind the path). I can
modify the rewrite rule in the test to look for the unencoded DB name and make
a request like
GET
/test_suite_db%2Fwith_slashes/_design/test/_rewrite/test_suite_db/with_slashes/foo
which works, but that seems a bit incongruous. Looking for feedback here.
> Paths ending in '/' rewrite query string params incorrectly
> -----------------------------------------------------------
>
> Key: COUCHDB-2031
> URL: https://issues.apache.org/jira/browse/COUCHDB-2031
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Eric Drechsel
>
> Problem is discussed in this [SO
> thread|http://stackoverflow.com/questions/5059499/access-couch-db-database-url-through-rewritten-url-with-query-parameters].
> To summarize, with
> {code:title=rewrites.js}
> [ { "from": "/dbname/*", "to: ../../*" },
> { "from": "/*", "to: *" } ]
> {code}
> /dbname/?foo=bar doesn't work; it rewrites to /dbname/_design/..?foo=bar
> instead.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)