incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aliaksandr Barysiuk <a.barys...@gmail.com>
Subject Rewrite adds quotes to parameters
Date Fri, 30 Nov 2012 13:53:44 GMT
Hello,

I'm trying to create a rewrite rule for my view that looks like: /myview/3/["1","2"]/["1","4"].
Rewrite rule is:
{
     "from": "/myview/:group_level/:startkey/:endkey",
     "to":   "/path_to_db_and_design_doc/_view/myview",
     "query": {
         "group_level" : ":group_level",
         "startkey"    : ":startkey",
         "endkey"      : ":endkey"
}

The issue is that this rewire rule adds extra quotes to every parameter in the query.

Logged examples:

1) without rewrite (myview?group_level=3&startkey["1","2"]&endkey=["1","4"])

/myview?endkey=%5B%221%22%2C%224%22%5D&startkey%5B%221%22%2C%222%22%5D=&group_level=3

2) with rewrite (myview/3/["1","2"]/["1","4"])

/myview?startkey=%22%5B%5C%221%27%2C%5C%222%5C%22%5D%22&endkey=%22%5B%5C%221%5C%22%2C%5C%224%5C%22%5D%22&group_level=3

So no results in second case.

Is there any way to avoid this extra quotes?

Thank's

Alex


Mime
View raw message