On Mon, Mar 15, 2010 at 9:55 PM, Zachary Zolton <[email protected]> wrote: > Howdy, > > I have the following rewrite rule: > > { > "from": "/events/:year", > "to": "_list/event-list/events-by-date", > "method": "GET", > "query": { > "startkey": [":year"], > "endkey": [":year", {}] > } > }, > > Now, I'll try to hit this URL for a specific year: > > $ curl http://localhost:6666/db/_design/ddoc/_rewrite/events/1975 > > Unfortunately, I didn't get the expected data. (;_;) > > Here's the log entry: > > [info] [<0.1522.0>] 127.0.0.1 - - 'GET' > /db/_design/ddoc/_list/event-list/events-by-date?startkey=%5B%22%3Ayear%22%5D&endkey=%5B%22%3Ayear%22%2C%7B%7D%5D&year=1975 > 200 > > Noticing that the start and end keys both contain %3Ayear, I'm > guessing that it just URL encoded the string ":year". So, I'm guessing > the rewriter module isn't looking for bind variables in key parameters > when the value is a list.
This behaviour isn't expected yet. I will commit a patch that allos this this week. > > Shall I open up a ticket in JIRA? > > Sure it's better for tracking anyway. - benoit
