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

"formats" is ignored inside arrays in URL rewriting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.2
    • None
    • HTTP Interface

    Description

      I have the following rewrite rule :
      {
      "from": "/data-update/:pool/:lastvisit",
      "to": "/_list/prettyJSON/questions-by-date",

      "query" : {
      "startkey" : [":pool", {}],
      "endkey" : [":pool", ":lastvisit"],
      "descending" : "true"
      },
      "formats":

      {"descending":"bool","lastvisit":"int"}

      }

      My questions-by-date view emits key of the type [<str>, <int>].
      The rewriter redirects /data-update/pool0/42 to /_list/prettyJSON/questions-by-date?descending=true&startkey=["pool0", {}]&endkey=["pool0", "42"]
      instead of /_list/prettyJSON/questions-by-date?descending=true&startkey=["pool0", {}]&endkey=["pool0", 42]
      (it adds quotes around "42").

      Attachments

        Activity

          People

            Unassigned Unassigned
            lovasoa Lovasoa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: