couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <>
Subject URL rewriter - bind variables and complex keys
Date Mon, 15 Mar 2010 20:55:30 GMT

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>] - - 'GET'

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.

Shall I open up a ticket in JIRA?



P.S. I'm running version 0.11.0b7929118-git, from a clean checkout of
the 0.11.x branch from Github.

View raw message