Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-677

Rewrite Handler not translating variables inside array values.

    XMLWordPrintableJSON

Details

    Description

      It seems that it's not possible at the moment create url rewrites with params such startkey,endkey or any query with an array value like "startkey" : [":user",0]
      I've found the same issue listed here: http://www.mail-archive.com/dev@couchdb.apache.org/msg06925.html where benoitc tells it should work and zachary told it's working for him, but mysteriously, not for me
      [
      {
      "from" : ":user",
      "to" : "_view/all",
      "method": "GET",
      "query" :

      { "startkey": [":user","a"], "endkey": [":user", "z"] }

      }
      ]

      it's a very simple rewrite, but I'm getting this when calling it:
      http://localhost:5984/test/_design/core/_rewrite/ludicco


      [info] [<0.3063.0>] 127.0.0.1 - - 'GET' /test/_design/core/_view/all?startkey=%5B%22%3Auser%22%2C%22a%22%5D&endkey=%5B%22%3Auser%22%2C%22z%22%5D&user=ludicco 200

      But the same works when using values such "startkey" : ":user".
      It seems that the rewrite handler expects only a simple string as placeholder.

      Attachments

        Activity

          People

            benoitc Benoit Chesneau
            ludicco Marcos Zanona
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: