You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/06/22 16:56:00 UTC
[jira] [Commented] (COUCHDB-2722) The keys from the rewrited query
params of a view should be blank when not specified in the URL
[ https://issues.apache.org/jira/browse/COUCHDB-2722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596023#comment-14596023 ]
ASF GitHub Bot commented on COUCHDB-2722:
-----------------------------------------
GitHub user supertinou opened a pull request:
https://github.com/apache/couchdb-couch/pull/59
COUCHDB-2722 Keys from rewrited query params should be blank when not specified in the URI
## Bug Fix
### COUCHDB-2722
The keys from the rewrited query params of a view should be blank when not specified in the URL.
*Please see the following JIRA link for more details...*
### JIRA
https://issues.apache.org/jira/browse/COUCHDB-2722
### Related Pull Requests
- Fix against __couchdb-chttpd__ :
- End-to-end tests against __couchdb__ :
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/supertinou/couchdb-couch COUCHDB-2722
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch/pull/59.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #59
----
commit fa44bfb1db94d88e748c51920940bf6f04aac1f8
Author: Martin Lagrange <la...@gmail.com>
Date: 2015-06-22T14:07:45Z
COUCHDB-2722
https://issues.apache.org/jira/browse/COUCHDB-2722
----
> The keys from the rewrited query params of a view should be blank when not specified in the URL
> -----------------------------------------------------------------------------------------------
>
> Key: COUCHDB-2722
> URL: https://issues.apache.org/jira/browse/COUCHDB-2722
> Project: CouchDB
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: HTTP Interface
> Affects Versions: 1.5.1, 1.6.0, 1.6.1
> Reporter: Martin Lagrange
> Priority: Minor
>
> When we rewrite the query params of a view as in the following example :
>
> {code:title=Design document test|borderStyle=solid}
> {
> _id:"_design/test",
> views : {
> rewriteKeyView: {
> // ...
> }
> },
> rewrites: [
> {
> "from": "renamedRewriteKeyView",
> "to": "_view/rewriteKeyView",
> "query": {
> "startkey": [
> ":by"
> ],
> "endkey": [
> ":by",
> {}
> ]
> }
> }
> ]
> }
> {code}
> specifying the param *by* as the main component of startkey and endkey
> When we access the renamed view "renamedRewriteKeyView", without specifying the by param in the URI like :
> {code}GET dbName/_design/test/renamedRewriteKeyView{code}
> the internal call should be : {code}rewriteKeyView?startkey=[""]&endkey=["",{}]{code}
> instead of : {code}rewriteKeyView?startkey=[":by"]&endkey=[":by",{}]{code}
> As you can see, when a key is not specified in the URI, it the value of this key will be kept as its name. Quite annoying in some cases.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)