couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: [jira] Commented: (COUCHDB-677) Rewrite Handler not translating variables inside array values.
Date Sun, 28 Mar 2010 22:48:33 GMT
You're totally right; there wholly different problems. I've been
trying so many experiments around URL rewriting lately, I think got a
crossed wire! (*_*)

On Sun, Mar 28, 2010 at 5:32 PM, Benoit Chesneau <bchesneau@gmail.com> wrote:
> On Mon, Mar 29, 2010 at 12:13 AM, Zachary Zolton
> <zachary.zolton@gmail.com> wrote:
>> Nope, I'm not having any luck, either...
>>
>> What I had working was a redirect like so:
>>
>> {
>>    "from": "/events/:year",
>>    "to": "_list/event-list/events-by-year",
>>    "query": {
>>      "key": ":year",
>>      "reduce": false,
>>      "include_docs": true
>>    }
>>  }
>>
>> Because the :year bindvar only needed to handle numbers, which
>> technically work without any JSON encoding.
>>
>> As soon as I tried using a string parameter, as a bindvar, I'd get:
>>
>> {
>>    "error": "bad_request"
>>    "reason": "invalid UTF-8 JSON"
>> }
>>
>> So, yes, we need JSON encoding of key, startkey and endkey.
>>
>>
> Uh ? Could you give exact example ? I fail to see how it's related to
> the ticket. Thanks.
>
> - benoit
>

Mime
View raw message